Merge pull request #264 from seleniumbase/add-missing-optional-parameter
Allow a custom timeout when waiting for link text
This commit is contained in:
commit
ca6d9e3a9f
|
@ -254,13 +254,14 @@ class BaseCase(unittest.TestCase):
|
|||
timeout = self.__get_new_timeout(timeout)
|
||||
if self.browser == 'phantomjs':
|
||||
if self.is_link_text_visible(link_text):
|
||||
element = self.wait_for_link_text_visible(link_text)
|
||||
element = self.wait_for_link_text_visible(
|
||||
link_text, timeout=timeout)
|
||||
element.click()
|
||||
return
|
||||
self.open(self.__get_href_from_link_text(link_text))
|
||||
return
|
||||
if not self.is_link_text_present(link_text):
|
||||
self.wait_for_link_text_present(link_text)
|
||||
self.wait_for_link_text_present(link_text, timeout=timeout)
|
||||
pre_action_url = self.get_current_url()
|
||||
try:
|
||||
element = self.wait_for_link_text_visible(
|
||||
|
|
Loading…
Reference in New Issue