I am trying the extract the text by using the CSS selector. as variables are dynamic in nature they are continuously updating.
#profileCard-ACoAABI4A30BKLei-DtaS6B6vQo-3ejw-nzI1W8-EDUCATION-en-US
this is a CSS selector
driver.find_element_by_css_selector('#profileCard-ACoAABI4A30BKLei-DtaS6B6vQo-3ejw-nzI1W8-EDUCATION-en-US').text
x_path = //*[@id="profileCard-ACoAABI4A30BKLei-DtaS6B6vQo-3ejw-nzI1W8-EDUCATION-en-US"]
# here i tried to apply the regex
driver.find_element_by_xpath("//*[ends-with(@id,'EDUCATION-en-US')]")
But I'm getting an error as 'InvalidSelectorException'.
Is there any way to get the data without error?
'ACoAABI4A30BKLei-DtaS6B6vQo-3ejw-nzI1W8' this path will be continuously updating. '#profileCard', 'EDUCATION-en-US' there will be no change in this
Any help or lead to solve the issue would be very helpful. Thanks in advance