forked from robotframework/SeleniumLibrary
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated work on adding service class
Some minor changes which I want to store away. Starting to see the final version of this code. Also started to add a test case copied from the options test. All this is a work in progress.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
*** Settings *** | ||
Suite Teardown Close All Browsers | ||
# Library ../resources/testlibs/get_selenium_options.py | ||
Resource resource.robot | ||
# Force Tags Known Issue Firefox Known Issue Safari Known Issue Internet Explorer | ||
Documentation Creating test which would work on all browser is not possible. | ||
... These tests are for Chrome only. | ||
*** Test Cases *** | ||
Chrome Browser With Chrome Service As String | ||
[Documentation] | ||
... LOG 1:14 DEBUG GLOB: *"goog:chromeOptions"* | ||
# ... LOG 1:14 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?* | ||
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} | ||
... service=executable_path=/usr/local/bin; port=9999 | ||
|
||
Chrome Browser With Chrome Service As String With service_args As List | ||
[Documentation] | ||
... LOG 1:14 DEBUG GLOB: *"goog:chromeOptions"* | ||
... LOG 1:14 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?* | ||
... LOG 1:14 DEBUG GLOB: *"--headless=new"* | ||
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} | ||
... service=service_args=['--append-log', '--readable-timestamp'], log_output=log_path) | ||
|
||
Chrome Browser With Selenium Options With Complex Object | ||
[Tags] NoGrid | ||
[Documentation] | ||
... LOG 1:14 DEBUG GLOB: *"goog:chromeOptions"* | ||
... LOG 1:14 DEBUG GLOB: *"mobileEmulation": {"deviceName": "Galaxy S5"* | ||
... LOG 1:14 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?* | ||
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} | ||
... options=add_argument ( "--disable-dev-shm-usage" ) ; add_experimental_option( "mobileEmulation" , { 'deviceName' : 'Galaxy S5'}) | ||
|
||
Chrome Browser With Selenium Options Object | ||
[Documentation] | ||
... LOG 2:14 DEBUG GLOB: *"goog:chromeOptions"* | ||
... LOG 2:14 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?* | ||
${options} = Get Chrome Options | ||
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} | ||
... desired_capabilities=${DESIRED_CAPABILITIES} options=${options} | ||
|
||
Chrome Browser With Selenium Options Invalid Method | ||
Run Keyword And Expect Error AttributeError: 'Options' object has no attribute 'not_here_method' | ||
... Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} | ||
... desired_capabilities=${DESIRED_CAPABILITIES} options=not_here_method("arg1") | ||
|
||
|
||
Chrome Browser With Selenium Options Argument With Semicolon | ||
[Documentation] | ||
... LOG 1:14 DEBUG GLOB: *"goog:chromeOptions"* | ||
... LOG 1:14 DEBUG GLOB: *["has;semicolon"* | ||
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} | ||
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("has;semicolon") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters