Skip to content

Commit 0e396e5

Browse files
committed
Add support for the ":contains()" selector
1 parent 4f24428 commit 0e396e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5906,6 +5906,9 @@ def __recalculate_selector(self, selector, by):
59065906
name = page_utils.get_name_from_selector(selector)
59075907
selector = '[name="%s"]' % name
59085908
by = By.CSS_SELECTOR
5909+
if ":contains(" in selector and by == By.CSS_SELECTOR:
5910+
selector = self.convert_css_to_xpath(selector)
5911+
by = By.XPATH
59095912
return (selector, by)
59105913

59115914
def __looks_like_a_page_url(self, url):

0 commit comments

Comments
 (0)