Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
theme: jekyll-theme-cayman
title: SeleniumBase
description: Automated Testing Made Easy
description: All-In-One Test Automation Framework
2 changes: 1 addition & 1 deletion help_docs/customizing_test_runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ The ``--report`` option gives you a fancy report after your test suite completes
```bash
nosetests my_test_suite.py --report
```
![](http://cdn2.hubspot.net/hubfs/100006/images/Test_Report_2.png "Example Nosetest Report")
<img src="https://cdn2.hubspot.net/hubfs/100006/images/Test_Report_2.png" title="Example Nosetest Report" height="420">

(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.)

Expand Down
6 changes: 6 additions & 0 deletions help_docs/method_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,16 @@ self.pick_select_option_by_index(dropdown_selector, option,
self.pick_select_option_by_value(dropdown_selector, option,
dropdown_by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT)

########

self.generate_referral(start_page, destination_page)

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

self.generate_referral_chain(pages)

self.generate_traffic_chain(pages, loops=1)

########

self.wait_for_element_present(selector, by=By.CSS_SELECTOR,
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pip
setuptools
ipython==5.6.0
selenium==3.11.0
selenium==3.14.0
nose==1.3.7
pytest==3.6.3
pytest==3.7.2
pytest-html==1.19.0
pytest-xdist==1.22.2
pytest-xdist==1.22.5
six==1.11.0
flake8==3.5.0
requests==2.19.1
Expand Down
1 change: 1 addition & 0 deletions seleniumbase/config/ad_block_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'[id*="-ad-"]',
'[id*="_ads_"]',
'[id*="AdFrame"]',
'[id*="carbonads"]',
'[id^="ad-"]',
'[id^="outbrain_widget"]',
'[id^="taboola-"]',
Expand Down
4 changes: 2 additions & 2 deletions seleniumbase/console_scripts/sb_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def main():
download_url = ("https://download.microsoft.com/download/"
"%s/%s" % (version_code, file_name))
elif name == "iedriver":
major_version = "3.11"
full_version = "3.11.1"
major_version = "3.14"
full_version = "3.14.0"
if "win32" in sys_plat:
file_name = "IEDriverServer_Win32_%s.zip" % full_version
elif "win64" in sys_plat or "x64" in sys_plat:
Expand Down
31 changes: 30 additions & 1 deletion seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ def __activate_shepherd(self):
backdrop_style = style_sheet.sh_backdrop_style

self.__activate_bootstrap()
self.wait_for_ready_state_complete()
for x in range(4):
# self.activate_jquery() # Included with __activate_bootstrap()
self.add_css_link(spinner_css)
Expand Down Expand Up @@ -1823,6 +1824,8 @@ def pick_select_option_by_value(self, dropdown_selector, option,
dropdown_by=dropdown_by, option_by="value",
timeout=timeout)

############

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

def generate_referral_chain(self, pages):
""" Use this method to chain the action of creating button links on
one website page that will take you to the next page.
(When you want to create a referral to a website for traffic
generation without increasing the bounce rate, you'll want to visit
at least one additional page on that site with a button click.) """
if not type(pages) is tuple and not type(pages) is list:
raise Exception(
"Exception: Expecting a list of website pages for chaining!")
if len(pages) < 2:
raise Exception(
"Exception: At least two website pages required for chaining!")
for page in pages:
# Find out if any of the web pages are invalid before continuing
if not page_utils.is_valid_url(page):
raise Exception(
"Exception: Website page {%s} is not a valid URL!" % page)
for page in pages:
self.generate_referral(None, page)

def generate_traffic_chain(self, pages, loops=1):
""" Similar to generate_referral_chain(), but for multiple loops. """
for loop in range(loops):
self.generate_referral_chain(pages)
time.sleep(0.05)

############

def wait_for_element_present(self, selector, by=By.CSS_SELECTOR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from urllib.request import urlopen

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

dir_path = os.path.dirname(os.path.realpath(__file__))
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='seleniumbase',
version='1.14.5',
version='1.14.6',
description='Web Automation & Testing Framework - http://seleniumbase.com',
long_description='Web Automation and Testing Framework - seleniumbase.com',
platforms='Mac * Windows * Linux * Docker',
Expand All @@ -20,11 +20,11 @@
'pip',
'setuptools',
'ipython==5.6.0',
'selenium==3.11.0',
'selenium==3.14.0',
'nose==1.3.7',
'pytest==3.6.3',
'pytest==3.7.2',
'pytest-html==1.19.0',
'pytest-xdist==1.22.2',
'pytest-xdist==1.22.5',
'six==1.11.0',
'flake8==3.5.0',
'requests==2.19.1',
Expand Down