Merge pull request #264 from seleniumbase/add-missing-optional-parameter

Allow a custom timeout when waiting for link text
This commit is contained in:
Michael Mintz 2019-01-09 20:55:09 -05:00 committed by GitHub
commit ca6d9e3a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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(

View File

@ -17,7 +17,7 @@ except IOError:
setup(
name='seleniumbase',
version='1.17.19',
version='1.17.20',
description='Reliable Browser Automation & Testing Framework',
long_description=long_description,
long_description_content_type='text/markdown',