Hi,
I am trying to look for specific words on a webpage. When I do a single If text doesn't exist on web page it works fine.
When I create a TextList and use:
Web browser instance: %Browser%
Check if web page: "Doesn't contain text"
Text: %TextList%
This does not work. I used "Add Item to List" and added several strings to the list.
Am I doing something wrong or is there another solution to check for multiple strings on a webpage?
Thanks
Steve O
Hi @steve_o_44
As you can see this action takes a Text and not a List or a Datatable type of variable.
Therefore you will need to loop through your List variable and pass each individual Text to the below box one by one within the loop. Code your logic such that if all Text from the List is found then return True if not then False.
Something like this (copy-paste in PAD):
Variables.CreateNewList List=> TextList
SET ContainsText TO $'''True'''
LOOP FOREACH ListItem IN TextList
IF (WebAutomation.IfWebPageContains.WebPageDoesNotContainText BrowserInstance: Browser Text: ListItem) THEN
SET ContainsText TO $'''False'''
END
END