Skip to content

Negative Assertions

assertElementNotContainsText

Description: This function will assert if the Element's text does not contain the expected text

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementNotContainsText @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementNotContainsText Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementNotContainsText %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not contain text [<Data>]", input = InputType.YES)
    public void assertElementNotContainsText() {
        String text = "";
        try {
            text = Locator.textContent();
            assertThat(Locator).not().containsText(Data);
            Report.updateTestLog(Action, "Element [" + ObjectName + "] does not contain text '" + Data + "'. Actual text is '" + text + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] contains text '" + Data + "'");
        }
    }

assertElementAttributeNotMatches

Description: This function will assert if the Element does not have the expected attribute.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementAttributeNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementAttributeNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementAttributeNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have attribute [<Data>]", input = InputType.YES)
    public void assertElementAttributeNotMatches() {
        String attributeName = Data.split(",")[0];
        String attributeValue = Data.split(",")[1];
        String actualAttributeValue = "";
        try {
            actualAttributeValue = Locator.getAttribute(attributeName);
            assertThat(Locator).not().hasAttribute(attributeName, attributeValue);
            Report.updateTestLog(Action, "Element [" + ObjectName + "] does not have attribute '" + attributeName + "' with value '" + attributeValue + "'. Actual value is '" + actualAttributeValue + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has attribute '" + attributeName + " = " + actualAttributeValue + "'");
        }
    }

assertElementClassNotMatches

Description: This function will assert if the Element does not match the expected class.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementClassNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementClassNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementClassNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have class [<Data>]", input = InputType.YES)
    public void assertElementClassNotMatches() {
        String actualClassValue = "";
        try {
            actualClassValue = Locator.getAttribute("class");
            assertThat(Locator).not().hasClass(Pattern.compile(Data));
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have 'class' matching '" + Data + "'. Actual value is '" + actualClassValue + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has 'class' matching '" + Data + "'");
        }
    }

assertElementCountNotMatches

Description: This function will assert if the count of Element does not match the expected count

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementCountNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementCountNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementCountNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if count of [<Object>] does not match [<Data>]", input = InputType.YES)
    public void assertElementCountNotMatches() {
        int elementCount = 0;
        try {
            elementCount = Locator.count();
            assertThat(Locator).not().hasCount(Integer.parseInt(Data));
            Report.updateTestLog(Action, "[" + ObjectName + "] count does not match '" + Data + "'. Actual count is +'" + elementCount + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] count matches '" + Data + "'");
        }
    }

assertElementCSSNotMatches

Description: This function will assert if the Element does not have the expected CSS attribute

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementCSSNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementCSSNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementCSSNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have the CSS [<Data>]", input = InputType.YES)
    public void assertElementCSSNotMatches() {
        String attributeName = Data.split(",")[0];
        String attributeValue = Data.split(",")[1];
        try {
            assertThat(Locator).not().hasCSS(attributeName, attributeValue);
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have CSS attribute '" + attributeName + "' with value '" + attributeValue + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has CSS attribute '" + attributeName + "' with value '" + attributeValue + "'");
        }
    }

assertElementIdNotMatches

Description: This function will assert if the Element does not have the expected ID

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIdNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIdNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIdNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have ID [<Data>]", input = InputType.YES)
    public void assertElementIdNotMatches() {
        String actualIdValue = "";
        try {
            actualIdValue = Locator.getAttribute("id");
            assertThat(Locator).not().hasId(Pattern.compile(Data));
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have 'ID' matching '" + Data + "'. Actual value is '" + actualIdValue + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has 'ID' matching '" + Data + "'");
        }
    }

assertElementJSPropertyNotMatches

Description: This function will assert if the Element does not have the expected JS Property attribute

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementJSPropertyNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementJSPropertyNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementJSPropertyNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have JS Property [<Data>]", input = InputType.YES)
    public void assertElementJSPropertyNotMatches() {
        String attributeName = Data.split(",")[0];
        String attributeValue = Data.split(",")[1];
        try {
            assertThat(Locator).not().hasJSProperty(attributeName, attributeValue);
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have JS Property attribute '" + attributeName + "' with value '" + attributeValue + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has JS Property attribute '" + attributeName + "' with value '" + attributeValue + "'");
        }
    }

assertElementTextNotMatches

Description: This function will assert if the Element's text does not match the expected text

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementTextNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementTextNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementTextNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have text [<Data>]", input = InputType.YES)
    public void assertElementTextNotMatches() {
        String text = "";
        try {
            text = Locator.textContent();
            assertThat(Locator).not().hasText(Pattern.compile(Data));
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have text '" + Data + "'. Actual text is '" + text + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has text '" + Data + "'");
        }
    }

assertElementValueNotMatches

Description: This function will assert if the Element's value does not match the expected value

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementValueNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementValueNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementValueNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not value [<Data>]", input = InputType.YES)
    public void assertElementValueNotMatches() {

        String value = "";
        try {
            value = Locator.getAttribute("value");
            assertThat(Locator).not().hasValue(Pattern.compile(Data));
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have value '" + Data + "'. Actual value is '" + value + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has value '" + Data + "'");
        }
    }

assertElementValuesNotMatch

Description: This function will assert if the Element's values does not match the expected values

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementValuesNotMatch @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementValuesNotMatch Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementValuesNotMatch %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have values [<Data>]", input = InputType.YES)
    public void assertElementValuesNotMatch() {
        try {
            String values[] = Data.split(",");
            Pattern[] pattern = new Pattern[values.length];
            for (int i = 0; i < values.length; i++) {
                pattern[i] = Pattern.compile(values[i]);
            }
            assertThat(Locator).not().hasValues(pattern);
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have values '" + Data + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has values '" + Data + "'");
        }
    }

assertElementIsNotAttached

Description: This function will assert if the Element is not attached to the DOM

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotAttached @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotAttached Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotAttached %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not point to an attached DOM node")
    public void assertElementIsNotAttached() {
        try {
            assertThat(Locator).not().isAttached();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not attached to the DOM", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is attached to the DOM");
        }
    }

assertElementIsNotChecked

Description: This function will assert if the Element is not checked.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotChecked @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotChecked Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotChecked %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not checked")
    public void assertElementIsNotChecked() {
        try {
            assertThat(Locator).not().isChecked();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not checked", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is checked");
        }
    }

assertElementIsNotDisabled

Description: This function will assert if the Element is not disabled.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotDisabled @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotDisabled Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotDisabled %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not disabled")
    public void assertElementIsNotDisabled() {
        try {
            assertThat(Locator).not().isDisabled();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not disabled", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is disabled");
        }
    }

assertElementIdNotMatches

Description: This function will assert if the Element does not have the expected ID

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIdNotMatches @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIdNotMatches Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIdNotMatches %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] does not have ID [<Data>]", input = InputType.YES)
    public void assertElementIdNotMatches() {
        String actualIdValue = "";
        try {
            actualIdValue = Locator.getAttribute("id");
            assertThat(Locator).not().hasId(Pattern.compile(Data));
            Report.updateTestLog(Action, "[" + ObjectName + "] does not have 'ID' matching '" + Data + "'. Actual value is '" + actualIdValue + "'", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] has 'ID' matching '" + Data + "'");
        }
    }

assertElementIsNotEditable

Description: This function will assert if the Element is not editable.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotEditable @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotEditable Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotEditable %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not editable")
    public void assertElementIsNotEditable() {
        try {
            assertThat(Locator).not().isEditable();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not editable", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is editable");
        }
    }

assertElementIsNotEmpty

Description: This function will assert if the Element is not empty.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotEmpty @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotEmpty Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotEmpty %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not empty")
    public void assertElementIsNotEmpty() {
        try {
            assertThat(Locator).not().isEmpty();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not empty", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is empty");
        }
    }

assertElementIsNotEnabled

Description: This function will assert if the Element is not enabled.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotEnabled @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotEnabled Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotEnabled %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not enabled")
    public void assertElementIsNotEnabled() {
        try {
            assertThat(Locator).not().isEnabled();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not enabled", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is enabled");
        }
    }

assertElementIsNotFocused

Description: This function will assert if the Element is not focused.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotFocused @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotFocused Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotFocused %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

    @Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not focused")
    public void assertElementIsNotFocused() {
        try {
            assertThat(Locator).not().isFocused();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not focused", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is focused");
        }
    }

assertElementIsNotHidden

Description: This function will assert if the Element is not hidden.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotHidden @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotHidden Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotHidden %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not hidden")
    public void assertElementIsNotHidden() {
        try {
            assertThat(Locator).not().isHidden();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not hidden", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is hidden");
        }
    }

assertElementIsNotInViewport

Description: This function will assert if the Element is not in viewport.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotInViewport @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotInViewport Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotInViewport %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

    @Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not in viewport")
    public void assertElementIsNotInViewport() {
        try {
            assertThat(Locator).not().isInViewport();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not in viewport", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is in viewport");
        }
    }

assertElementIsNotVisible

Description: This function will assert if the Element is not visible.

Input Format : @Expected Text

ObjectName Action Input Condition Reference
Browser 🟢 assertElementIsNotVisible @value PageName ⬅ Hardcoded Input
Browser 🟢 assertElementIsNotVisible Sheet:Column PageName ⬅ Input from Datasheet
Browser 🟢 assertElementIsNotVisible %dynamicVar% PageName ⬅ Input from variable

Inputs in the Input column can be either hardcoded (in this case the data is preceded by a "@"), passed from the data sheet (datasheet name : column name) or passed from a variable value (%variable name%), as given in the above example.

@Action(object = ObjectType.PLAYWRIGHT, desc = "Assert if [<Object>] is not visible")
    public void assertElementIsNotVisible() {
        try {
            assertThat(Locator).not().isVisible();
            Report.updateTestLog(Action, "[" + ObjectName + "] is not visible", Status.PASS);
        } catch (PlaywrightException e) {
            PlaywrightExceptionLogging(e);
        } catch (AssertionFailedError err) {
            assertionLogging(err, "[" + ObjectName + "] is visible");
        }
    }