I am having trouble with re.search finding the string "Senders' Domains" on my UI.
word_check1 = 'Senders'
word_check2 = "Senders' Domains"
page_check1, page_check2 = mymessages_page.page_checker(word_check1, word_check2, 'chart-content-container')
When I Debug, my page_checker method finds "Senders//s Domains" but then re.search returns "Senders//sDomains" (removing the space).
def page_checker(self, word_check1, word_check2, ids):
container = self.driver.find_element_by_id(ids)
content = container.text
organized_container_content = content.split('\n')
for text in organized_container_content:
if re.search(word_check1, text):
check1 = text
for text2 in organized_container_content:
if re.search(word_check2, text2):
check2 = text2
return check1, check2
break
Is there any way I can escape the single quote (') and space characters so that I can find and match the string "Senders' Domains" on my UI?