convert_xpath_to_css does not support long xpath #2732
-
|
How do i click a button via Diver() and xpath: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Not every XPath has a matching CSS Selector. There isn't even a This means that you should either provide a CSS Selector directly, or an XPath Selector that can be converted into a natural CSS Selector. Otherwise you'll get errors, the |
Beta Was this translation helpful? Give feedback.
Not every XPath has a matching CSS Selector. There isn't even a
:contains("TEXT")selector in CSS. SeleniumBase has a specialTAG:contains("TEXT")selector, which gets converted to XPath before use, but you need to make a JavaScript call, which requires a normal CSS Selector (and that doesn't allow any kind of:contains("TEXT")selector).This means that you should either provide a CSS Selector directly, or an XPath Selector that can be converted into a natural CSS Selector. Otherwise you'll get errors, the
uc_click(selector)won't work, or theuc_click(selector)won't click with stealth.