You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to read a value for particular locator and comparing with expected value but my canopy code is reading blank value for that locator.
let locator = ".//h2[@ng-if="vm.property.PropertyId"]"
let expectedValue = "Property Essentials"
displayed locator
let actualValue = read Locator
expectedValue === actualValue
I tried many locators which are highlighted using xpath checker add-in also if I write a code to verify element is displayed or not then it works fine.
Attaching screen shot for error and locator identification.
Could you please help?
The text was updated successfully, but these errors were encountered:
Without seeing the html I can only guess. I bet that inside the h2 there is a div or span or some other element that actually contains the value of Property Essentials
Hmm, next guess would be that you are using === instead of ==, the triple = does not do any retries, its like a normal unit test assertion for equality.
== will try again and again until its true or a time limit is hit and it fails. It could be that at the point you are trying to do the assertion, the page is not finished loading and that H2 is not there.
Switching to ".panel-title" == "Property Essentials" will probably fix it.
I dont find myself using read or === very often personally.
Hi Team,
I am trying to read a value for particular locator and comparing with expected value but my canopy code is reading blank value for that locator.
I tried many locators which are highlighted using xpath checker add-in also if I write a code to verify element is displayed or not then it works fine.
Attaching screen shot for error and locator identification.
Could you please help?
The text was updated successfully, but these errors were encountered: