Skip to content

Commit dfe32b6

Browse files
authored
Merge pull request #195 from seleniumbase/new-selenium-upgrade
New selenium upgrade
2 parents 3ffe6a2 + 482e63c commit dfe32b6

File tree

9 files changed

+50
-14
lines changed

9 files changed

+50
-14
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
theme: jekyll-theme-cayman
22
title: SeleniumBase
3-
description: Automated Testing Made Easy
3+
description: All-In-One Test Automation Framework

help_docs/customizing_test_runs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The ``--report`` option gives you a fancy report after your test suite completes
102102
```bash
103103
nosetests my_test_suite.py --report
104104
```
105-
![](http://cdn2.hubspot.net/hubfs/100006/images/Test_Report_2.png "Example Nosetest Report")
105+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/Test_Report_2.png" title="Example Nosetest Report" height="420">
106106

107107
(NOTE: You can add ``--show_report`` to immediately display Nosetest reports after the test suite completes. Only use ``--show_report`` when running tests locally because it pauses the test run.)
108108

help_docs/method_summary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,16 @@ self.pick_select_option_by_index(dropdown_selector, option,
191191
self.pick_select_option_by_value(dropdown_selector, option,
192192
dropdown_by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT)
193193

194+
########
195+
194196
self.generate_referral(start_page, destination_page)
195197

196198
self.generate_traffic(start_page, destination_page, loops=1)
197199

200+
self.generate_referral_chain(pages)
201+
202+
self.generate_traffic_chain(pages, loops=1)
203+
198204
########
199205

200206
self.wait_for_element_present(selector, by=By.CSS_SELECTOR,

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
pip
22
setuptools
33
ipython==5.6.0
4-
selenium==3.11.0
4+
selenium==3.14.0
55
nose==1.3.7
6-
pytest==3.6.3
6+
pytest==3.7.2
77
pytest-html==1.19.0
8-
pytest-xdist==1.22.2
8+
pytest-xdist==1.22.5
99
six==1.11.0
1010
flake8==3.5.0
1111
requests==2.19.1

seleniumbase/config/ad_block_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
'[id*="-ad-"]',
2929
'[id*="_ads_"]',
3030
'[id*="AdFrame"]',
31+
'[id*="carbonads"]',
3132
'[id^="ad-"]',
3233
'[id^="outbrain_widget"]',
3334
'[id^="taboola-"]',

seleniumbase/console_scripts/sb_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def main():
131131
download_url = ("https://download.microsoft.com/download/"
132132
"%s/%s" % (version_code, file_name))
133133
elif name == "iedriver":
134-
major_version = "3.11"
135-
full_version = "3.11.1"
134+
major_version = "3.14"
135+
full_version = "3.14.0"
136136
if "win32" in sys_plat:
137137
file_name = "IEDriverServer_Win32_%s.zip" % full_version
138138
elif "win64" in sys_plat or "x64" in sys_plat:

seleniumbase/fixtures/base_case.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ def __activate_shepherd(self):
872872
backdrop_style = style_sheet.sh_backdrop_style
873873

874874
self.__activate_bootstrap()
875+
self.wait_for_ready_state_complete()
875876
for x in range(4):
876877
# self.activate_jquery() # Included with __activate_bootstrap()
877878
self.add_css_link(spinner_css)
@@ -1823,6 +1824,8 @@ def pick_select_option_by_value(self, dropdown_selector, option,
18231824
dropdown_by=dropdown_by, option_by="value",
18241825
timeout=timeout)
18251826

1827+
############
1828+
18261829
def generate_referral(self, start_page, destination_page):
18271830
""" This method opens the start_page, creates a referral link there,
18281831
and clicks on that link, which goes to the destination_page.
@@ -1842,7 +1845,7 @@ def generate_referral(self, start_page, destination_page):
18421845
referral_link = ('''<a class='analytics referral test' href='%s' '''
18431846
'''style='font-family: Arial,sans-serif; '''
18441847
'''font-size: 30px; color: #18a2cd'>'''
1845-
'''* Magic Link Button! *</a>''' % destination_page)
1848+
'''Magic Link Button</a>''' % destination_page)
18461849
self.execute_script(
18471850
'''document.body.innerHTML = \"%s\"''' % referral_link)
18481851
time.sleep(0.1)
@@ -1860,6 +1863,32 @@ def generate_traffic(self, start_page, destination_page, loops=1):
18601863
self.generate_referral(start_page, destination_page)
18611864
time.sleep(0.05)
18621865

1866+
def generate_referral_chain(self, pages):
1867+
""" Use this method to chain the action of creating button links on
1868+
one website page that will take you to the next page.
1869+
(When you want to create a referral to a website for traffic
1870+
generation without increasing the bounce rate, you'll want to visit
1871+
at least one additional page on that site with a button click.) """
1872+
if not type(pages) is tuple and not type(pages) is list:
1873+
raise Exception(
1874+
"Exception: Expecting a list of website pages for chaining!")
1875+
if len(pages) < 2:
1876+
raise Exception(
1877+
"Exception: At least two website pages required for chaining!")
1878+
for page in pages:
1879+
# Find out if any of the web pages are invalid before continuing
1880+
if not page_utils.is_valid_url(page):
1881+
raise Exception(
1882+
"Exception: Website page {%s} is not a valid URL!" % page)
1883+
for page in pages:
1884+
self.generate_referral(None, page)
1885+
1886+
def generate_traffic_chain(self, pages, loops=1):
1887+
""" Similar to generate_referral_chain(), but for multiple loops. """
1888+
for loop in range(loops):
1889+
self.generate_referral_chain(pages)
1890+
time.sleep(0.05)
1891+
18631892
############
18641893

18651894
def wait_for_element_present(self, selector, by=By.CSS_SELECTOR,

seleniumbase/utilities/selenium_grid/download_selenium_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from urllib.request import urlopen
99

1010
SELENIUM_JAR = ("http://selenium-release.storage.googleapis.com"
11-
"/3.11/selenium-server-standalone-3.11.0.jar")
12-
JAR_FILE = "selenium-server-standalone-3.11.0.jar"
11+
"/3.14/selenium-server-standalone-3.14.0.jar")
12+
JAR_FILE = "selenium-server-standalone-3.14.0.jar"
1313
RENAMED_JAR_FILE = "selenium-server-standalone.jar"
1414

1515
dir_path = os.path.dirname(os.path.realpath(__file__))

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name='seleniumbase',
10-
version='1.14.5',
10+
version='1.14.6',
1111
description='Web Automation & Testing Framework - http://seleniumbase.com',
1212
long_description='Web Automation and Testing Framework - seleniumbase.com',
1313
platforms='Mac * Windows * Linux * Docker',
@@ -20,11 +20,11 @@
2020
'pip',
2121
'setuptools',
2222
'ipython==5.6.0',
23-
'selenium==3.11.0',
23+
'selenium==3.14.0',
2424
'nose==1.3.7',
25-
'pytest==3.6.3',
25+
'pytest==3.7.2',
2626
'pytest-html==1.19.0',
27-
'pytest-xdist==1.22.2',
27+
'pytest-xdist==1.22.5',
2828
'six==1.11.0',
2929
'flake8==3.5.0',
3030
'requests==2.19.1',

0 commit comments

Comments
 (0)