Reputation: 45
I want to wait until page is fully loaded or some text on page is visible using selenium chrome webdriver. The problem is I can not see inspect element because It is aws terminal linux session.
Text present on page is - "sudo yum update"
Upvotes: 1
Views: 350
Reputation: 14145
Option 1: you can check for the text in the page source.
import re # make sure to add this package
src = driver.page_source
text_found = re.search(r'sudo yum update', src)
print (text_found)
Option 2:
simply use the xpath to wait for element present.
//*[contains(.,'sudo yum update')]
Upvotes: 2