Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_text_on_the_page(text):
- selector = '//*[contains(text(), "{}")]'.format(text)
- elements = browser.find_elements_by_xpath(selector)
- assert len(elements), 'The text is not on the page'
Add Comment
Please, Sign In to add comment