Skip to content

Commit ef097ee

Browse files
committed
Remove references to PhantomJS in the code
1 parent 2cfa7cc commit ef097ee

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,6 @@ def get_partial_link_text_attribute(
13471347

13481348
def click_link_text(self, link_text, timeout=None):
13491349
"""This method clicks link text on a page."""
1350-
# If using phantomjs, might need to extract and open the link directly
13511350
self.__check_scope()
13521351
if not timeout:
13531352
timeout = settings.SMALL_TIMEOUT
@@ -1356,15 +1355,6 @@ def click_link_text(self, link_text, timeout=None):
13561355
pre_action_url = self.driver.current_url
13571356
pre_window_count = len(self.driver.window_handles)
13581357
link_text = self.__get_type_checked_text(link_text)
1359-
if self.browser == "phantomjs":
1360-
if self.is_link_text_visible(link_text):
1361-
element = self.wait_for_link_text_visible(
1362-
link_text, timeout=timeout
1363-
)
1364-
element.click()
1365-
return
1366-
self.open(self.__get_href_from_link_text(link_text))
1367-
return
13681358
if self.browser == "safari":
13691359
if self.demo_mode:
13701360
self.wait_for_link_text_present(link_text, timeout=timeout)
@@ -1481,45 +1471,12 @@ def click_link_text(self, link_text, timeout=None):
14811471

14821472
def click_partial_link_text(self, partial_link_text, timeout=None):
14831473
"""This method clicks the partial link text on a page."""
1484-
# If using phantomjs, might need to extract and open the link directly
14851474
self.__check_scope()
14861475
if not timeout:
14871476
timeout = settings.SMALL_TIMEOUT
14881477
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
14891478
timeout = self.__get_new_timeout(timeout)
14901479
partial_link_text = self.__get_type_checked_text(partial_link_text)
1491-
if self.browser == "phantomjs":
1492-
if self.is_partial_link_text_visible(partial_link_text):
1493-
element = self.wait_for_partial_link_text(partial_link_text)
1494-
if not self.undetectable or self.__uc_frame_layer > 0:
1495-
element.click()
1496-
else:
1497-
element.uc_click()
1498-
return
1499-
soup = self.get_beautiful_soup()
1500-
html_links = soup.fetch("a")
1501-
for html_link in html_links:
1502-
if partial_link_text in html_link.text:
1503-
for html_attribute in html_link.attrs:
1504-
if html_attribute[0] == "href":
1505-
href = html_attribute[1]
1506-
if href.startswith("//"):
1507-
link = "http:" + href
1508-
elif href.startswith("/"):
1509-
url = self.driver.current_url
1510-
domain_url = self.get_domain_url(url)
1511-
link = domain_url + href
1512-
else:
1513-
link = href
1514-
self.open(link)
1515-
return
1516-
raise Exception(
1517-
"Could not parse link from partial link_text "
1518-
"{%s}" % partial_link_text
1519-
)
1520-
raise Exception(
1521-
"Partial link text {%s} was not found!" % partial_link_text
1522-
)
15231480
if not self.is_partial_link_text_present(partial_link_text):
15241481
self.wait_for_partial_link_text_present(
15251482
partial_link_text, timeout=timeout

0 commit comments

Comments
 (0)