Skip to content

Commit 42afc74

Browse files
authored
Merge pull request #480 from seleniumbase/small-updates
Small updates
2 parents f262631 + dd08898 commit 42afc74

File tree

7 files changed

+23
-13
lines changed

7 files changed

+23
-13
lines changed

examples/edge_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_edge(self):
1010
if self.browser != "edge":
1111
print("\n This test is only for Microsoft Edge (Chromium)!")
1212
print(" (Run with: '--browser=edge')")
13-
self.skipTest("This test is only for Microsoft Edge (Chromium)! ")
13+
self.skip_test("This test is only for Microsoft Edge (Chromium)!")
1414
self.open("edge://settings/help")
1515
self.assert_element('img[alt="Edge logo"] + span')
1616
self.highlight('div[role="main"] div div div + div')

help_docs/method_summary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ self.jquery_update_text(selector, new_value, by=By.CSS_SELECTOR, timeout=None)
264264

265265
self.set_time_limit(time_limit)
266266

267+
self.skip_test(reason="")
268+
267269
########
268270

269271
self.add_css_link(css_link)

seleniumbase/config/proxy_list.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
"""
2020

2121
PROXY_LIST = {
22-
"example1": "104.236.248.219:3128", # (Example) - set your own proxy here
23-
"example2": "52.187.121.7:3128", # (Example) - set your own proxy here
22+
"example1": "52.187.121.7:3128", # (Example) - set your own proxy here
23+
"example2": "193.32.6.6:8080", # (Example) - set your own proxy here
24+
"example3": "185.204.208.78:8080", # (Example) - set your own proxy here
2425
"proxy1": None,
2526
"proxy2": None,
2627
"proxy3": None,

seleniumbase/console_scripts/sb_install.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
Example:
1313
seleniumbase install chromedriver
1414
seleniumbase install geckodriver
15+
seleniumbase install edgedriver
1516
seleniumbase install chromedriver 76.0.3809.126
1617
seleniumbase install chromedriver latest
1718
seleniumbase install chromedriver -p
1819
seleniumbase install chromedriver latest -p
20+
seleniumbase install edgedriver 79.0.309.65
1921
Output:
2022
Installs the chosen webdriver to seleniumbase/drivers/
2123
(chromedriver is required for Chrome automation)

seleniumbase/fixtures/base_case.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,13 @@ def get_page_source(self):
440440

441441
def get_page_title(self):
442442
self.wait_for_ready_state_complete()
443-
self.wait_for_element_present("title", timeout=settings.MINI_TIMEOUT)
443+
self.wait_for_element_present("title", timeout=settings.SMALL_TIMEOUT)
444+
time.sleep(0.03)
444445
return self.driver.title
445446

446447
def get_title(self):
447448
""" The shorter version of self.get_page_title() """
448-
self.wait_for_ready_state_complete()
449-
self.wait_for_element_present("title", timeout=settings.MINI_TIMEOUT)
450-
return self.driver.title
449+
return self.get_page_title()
451450

452451
def go_back(self):
453452
self.__last_page_load_url = None
@@ -2264,7 +2263,7 @@ def assert_not_equal(self, first, second, msg=None):
22642263
def assert_title(self, title):
22652264
""" Asserts that the web page title matches the expected title. """
22662265
expected = title
2267-
actual = self.get_title()
2266+
actual = self.get_page_title()
22682267
self.assertEqual(expected, actual, "Expected page title [%s] "
22692268
"does not match the actual page title [%s]!"
22702269
"" % (expected, actual))
@@ -2302,6 +2301,8 @@ def assert_no_js_errors(self):
23022301
self.__highlight_with_assert_success(messenger_post, "html")
23032302

23042303
def __activate_html_inspector(self):
2304+
self.wait_for_ready_state_complete()
2305+
time.sleep(0.05)
23052306
js_utils.activate_html_inspector(self.driver)
23062307

23072308
def inspect_html(self):
@@ -2483,6 +2484,10 @@ def set_time_limit(self, time_limit):
24832484
sb_config.time_limit = None
24842485
sb_config.time_limit_ms = None
24852486

2487+
def skip_test(self, reason=""):
2488+
""" Mark the test as Skipped. """
2489+
self.skipTest(reason)
2490+
24862491
############
24872492

24882493
def add_css_link(self, css_link):

seleniumbase/fixtures/js_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,11 @@ def activate_jquery_confirm(driver):
385385

386386
if not is_jquery_activated(driver):
387387
add_js_link(driver, jquery_js)
388-
wait_for_jquery_active(driver, timeout=0.6)
388+
wait_for_jquery_active(driver, timeout=0.9)
389389
add_css_link(driver, jq_confirm_css)
390390
add_js_link(driver, jq_confirm_js)
391391

392-
for x in range(7):
392+
for x in range(15):
393393
# jQuery-Confirm needs a small amount of time to load & activate.
394394
try:
395395
driver.execute_script("jconfirm")
@@ -408,10 +408,10 @@ def activate_html_inspector(driver):
408408
return
409409
if not is_jquery_activated(driver):
410410
add_js_link(driver, jquery_js)
411-
wait_for_jquery_active(driver, timeout=0.6)
411+
wait_for_jquery_active(driver, timeout=0.9)
412412
add_js_link(driver, html_inspector_js)
413413

414-
for x in range(7):
414+
for x in range(15):
415415
# HTML-Inspector needs a small amount of time to load & activate.
416416
try:
417417
driver.execute_script("HTMLInspector")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
setup(
4747
name='seleniumbase',
48-
version='1.34.20',
48+
version='1.34.21',
4949
description='Fast, Easy, and Reliable Browser Automation & Testing.',
5050
long_description=long_description,
5151
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)