Hello,
I need to verify text in table using a variable, right now I can store the text field value in a variable. However, when I used the WebUI.verifyTextPresent(variable) to verify the text in the table, it does not work even if it is created.
Please help
Take a read of this.
Also, remember the table columns start at zero. And, put a wait statement before detecting the “table/body” to ensure the table exists (to prevent a null error).
1 Like
how do you get the table if the table is in frame?
Hi - must first capture the iframe as a test object and then use the following keyword to switch to that frame (similar to a new layer):
Got it, thanks. Just need to switch frame before getWebDriver().
1 Like
After you “WebUI.switchToFrame(…)”, don’t forget to come back to the main “area” again with “WebUI.switchToDefaultContent()”.
WebUI.switchToFrame(...)
//blah blah blah
WebUI.switchToDefaultContent()