I am writing a custom keyword to verify a particular text is not present in the Grid in column X
Following is the TestObject I have defined.
XPATH = ‘//table[@id=‘tblMyDocumentsResults’]/tbody/tr/td[9]’
Object has Parent IFrame = '//iframe[@id=‘iframe_103’]
Now in Customer keyword I am using following command to get list of WebElements
List rows = WebUiCommonHelper.findWebElements(testObject, 60)
After executing the script.
In Console I am seeing that, System is not switching to IFrame before locating the elements which causes the element not to be found.
Only built-in keywords can switch to parent objects (iFrame, shadow DOM) automatically, other functions e.g findWebElements or findWebElement can’t switch automatically because they are not implemented yet within these functions.