-
SelectorSyntaxError: Expected an argument, got <DELIM '^' at 13> Note that the following code works fine:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I see the issue. I'll make an update to allow for the XPath |
Beta Was this translation helpful? Give feedback.
-
I upgraded to 2.3.13 and got the following
venv/lib/python3.9/site-packages/seleniumbase/fixtures/base_case.py:1859: driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="e67567bde83ea570081c29f348b216fb")>
venv/lib/python3.9/site-packages/seleniumbase/fixtures/page_actions.py:148: self = <selenium.webdriver.chrome.webdriver.WebDriver (session="e67567bde83ea570081c29f348b216fb")>
venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:1244: self = <selenium.webdriver.chrome.webdriver.WebDriver (session="e67567bde83ea570081c29f348b216fb")>
venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:424: |
Beta Was this translation helpful? Give feedback.
-
I upgraded seleniumbase to 2.3.14 and installed the latest chromediver and I have the latest chrome browser. I am still getting invalid selector error message. why is "//div[contains(@Class,'field row')]//div[text()='TextInput65691513430']" an invalid selector ? |
Beta Was this translation helpful? Give feedback.
I see the issue.
The current solution is to use one of the following selectors:
XPATH:
"//div[contains(@class, 'field row')]//div[contains(., 'TextInput65691513430')]"
Or CSS:
'div[class*="field row"] div:contains("TextInput65691513430")'
I'll make an update to allow for the XPath
text()='TEXT'
selector in the long run. Currently, the XPathcontains(., 'TEXT')
is the standard for XPath selectors containing text. It'll be shipped in the next release.