Package pytest_auto :: Module selenium_plugin
[hide private]
[frames] | no frames]

Module selenium_plugin

source code

Functions [hide private]
 
pytest_addoption(parser)
Options supported by pytest's selenium plug-in
source code
 
driver(request, tlib_logger, adb_logger)
Fixture to creates a Webdriver object to interact with native apps specified by command line parameters
source code
 
selendroid_driver(tlib_logger, serial_id)
Function to create Webdriver object to interact with native apps
source code
 
browser(request, tlib_logger, adb_logger, chromedriver_version)
Fixture to create a browser as specified by the command line parameter --browser
source code
 
chromedriver_version(request, tlib_logger)
Fixture to create a browser as specified by the command line parameter --browser
source code
 
get_browser(request, tlib_logger, adb_logger, browser_str, chromedriver='latest')
Creates a Webdriver object to interact with browser specified in browser_str parameter
source code
 
mobile_base_url(request, tlib_logger)
Returns value of --mobile_base_url command line parameter
source code
Variables [hide private]
  __package__ = 'pytest_auto'
Function Details [hide private]

driver(request, tlib_logger, adb_logger)

source code 

Fixture to creates a Webdriver object to interact with native apps specified by command line parameters

Parameters:
  • request (FixtureRequest) - Object that gives access to the requesting test context
  • tlib_logger (logging.Logger) - logger for tlib related actions
Decorators:
  • @pytest.fixture(scope= 'class')

selendroid_driver(tlib_logger, serial_id)

source code 

Function to create Webdriver object to interact with native apps

Parameters:
  • tlib_logger (logging.Logger) - logger for tlib related actions
  • serial_id (str) - Serial Id of android device. If not given default android device will be used

browser(request, tlib_logger, adb_logger, chromedriver_version)

source code 

Fixture to create a browser as specified by the command line parameter --browser

Decorators:
  • @pytest.fixture(scope= 'class')

chromedriver_version(request, tlib_logger)

source code 

Fixture to create a browser as specified by the command line parameter --browser

Decorators:
  • @pytest.fixture(scope= 'class')

get_browser(request, tlib_logger, adb_logger, browser_str, chromedriver='latest')

source code 

Creates a Webdriver object to interact with browser specified in browser_str parameter

Parameters:
  • request (FixtureRequest) - Object that gives access to the requesting test context
  • tlib_logger (logging.Logger) - logger for tlib related actions
  • adb_logger (logging.Logger) - logger for adb related actions
  • browser_str (str) - browser to launch. It cna be firefox, chrome, ie or android
  • chromedriver (str) - Version of ChromeDriver to use. Pass 'latest' to use the latest version

mobile_base_url(request, tlib_logger)

source code 

Returns value of --mobile_base_url command line parameter

Decorators:
  • @pytest.fixture(scope= "class")