assertAttribue error


#1

I have the following two statements in my test case:

verifyElementPresent | name=ProductIsLEP
assertAttribute | name=ProductIsLEP | checked |

The element is present on the page.

The verifyElement command succeeds. The assertAttribute fails with the message “Element name=ProductIsLE not found”.

I should add that in the same testcase i have a similar sequence on the same element but using assertNotAttribute and if does not fail.


#2

I just discovered that assertNotAttribute returns true even if the element does include the named attribute.


#3

For “assertAttribute”, the target should be locator@attribute, e.g.

assertAttribute | name=ProductIsLEP@checked |

Could you please try again and let us know the result.

Thank you.


#4

I’ve made an example here https://gist.github.com/devalex88/c776e274ca95a1c96ccf031857007215.