Skip to content

Commit 8b2175d

Browse files
Excludes Get Browser Capabilities on RF 2.8.7.
1 parent 63527f1 commit 8b2175d

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ matrix:
4747
- BROWSER=chrome
4848
- SELENIUM=3.7.0
4949
- ROBOTFRAMEWORK=2.8.7
50-
- ROBOT_OPTIONS=
50+
- ROBOT_OPTIONS="--exclude not_on_rf_2.8.7"
5151
- python: "3.3"
5252
env:
5353
- BROWSER=chrome

test/acceptance/keywords/capabilities.robot

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Library Collections
55

66
*** Test Cases ***
77
Get Browser Capabilities Using Dictionary
8-
[Documentation]
98
[Setup] Set Driver Variables
109
Create Webdriver ${DRIVER_NAME}
1110
${capabilities}= Get Browser Capabilities
@@ -20,57 +19,54 @@ Test Capabilities Browser Name, Platform and Version
2019
${browser}= Normalize Browser Name
2120
Should Match ${capabilities['browserName']} ${browser}
2221
${status} ${platform}= Run Keyword And Ignore Error Set Variable ${capabilities['platform']}
23-
Run Keyword If "${status}" == "PASS" Log Platform = ${platform} ELSE
24-
... Log Platform = ${capabilities['platformName']}
22+
Run Keyword If "${status}" == "PASS" Log Platform = ${platform}
23+
... ELSE Log Platform = ${capabilities['platformName']}
2524
${status} ${version}= Run Keyword And Ignore Error Set Variable ${capabilities['version']}
26-
Run Keyword If "${status}" == "PASS" Log Browser Version = ${version} ELSE
27-
... Log Browser Version = ${capabilities['browserVersion']}
25+
Run Keyword If "${status}" == "PASS" Log Browser Version = ${version}
26+
... ELSE Log Browser Version = ${capabilities['browserVersion']}
2827
[Teardown] Close Browser
2928

3029
Get Browser Capabilities Using Attributes
3130
[Documentation] Using Open Browser
31+
[Tags] not_on_rf_2.8.7
3232
[Setup] Set Driver Variables
33-
Open Browser about:blank ${DRIVER_NAME}
33+
not_on_rf_2.8.7 about:blank ${DRIVER_NAME}
3434
&{capabilities}= Get Browser Capabilities
3535
Log Capabilities = &{capabilities}
3636
[Teardown] Close Browser
3737

3838
Test Capabilities Browser Name, Platform and Version Using Attributes
39-
[Documentation]
39+
[Tags] not_on_rf_2.8.7
4040
[Setup] Set Driver Variables
41-
Create Webdriver ${DRIVER_NAME}
41+
not_on_rf_2.8.7 ${DRIVER_NAME}
4242
&{capabilities}= Get Browser Capabilities
4343
${browser}= Normalize Browser Name
4444
Should Match ${capabilities.browserName} ${browser}
4545
${status} ${platform}= Run Keyword And Ignore Error Set Variable ${capabilities.platform}
46-
Run Keyword If "${status}" == "PASS" Log Platform = ${platform} ELSE
47-
... Log Platform = ${capabilities.platformName}
46+
Run Keyword If "${status}" == "PASS" Log Platform = ${platform}
47+
... ELSE Log Platform = ${capabilities.platformName}
4848
${status} ${version}= Run Keyword And Ignore Error Set Variable ${capabilities.version}
49-
Run Keyword If "${status}" == "PASS" Log Browser Version = ${version} ELSE
50-
... Log Browser Version = ${capabilities.browserVersion}
49+
Run Keyword If "${status}" == "PASS" Log Browser Version = ${version}
50+
... ELSE Log Browser Version = ${capabilities.browserVersion}
5151
Log Wearable = ${capabilities.get('wearable', 'What were you expecting? To wear a browser?')}
5252
# [Teardown] Close Browser
5353

5454
*** Keywords ***
5555
Set Driver Variables
5656
[Documentation] Selects proper driver
57-
${drivers}= Create Dictionary ff=Firefox firefox=Firefox ie=Ie
58-
... internetexplorer=Ie googlechrome=Chrome gc=Chrome
59-
... chrome=Chrome opera=Opera phantomjs=PhantomJS safari=Safari
57+
${drivers}= Create Dictionary ff=Firefox firefox=Firefox ie=Ie internetexplorer=Ie googlechrome=Chrome
58+
... gc=Chrome chrome=Chrome opera=Opera phantomjs=PhantomJS safari=Safari
6059
${name}= Evaluate "Remote" if "${REMOTE_URL}"!="None" else ${drivers}["${BROWSER.lower().replace(' ', '')}"]
6160
Set Test Variable ${DRIVER_NAME} ${name}
62-
${dc names}= Create Dictionary ff=FIREFOX firefox=FIREFOX ie=INTERNETEXPLORER
63-
... internetexplorer=INTERNETEXPLORER googlechrome=CHROME gc=CHROME
64-
... chrome=CHROME opera=OPERA phantomjs=PHANTOMJS htmlunit=HTMLUNIT
65-
... htmlunitwithjs=HTMLUNITWITHJS android=ANDROID iphone=IPHONE
66-
... safari=SAFARI
61+
${dc names}= Create Dictionary ff=FIREFOX firefox=FIREFOX ie=INTERNETEXPLORER internetexplorer=INTERNETEXPLORER googlechrome=CHROME
62+
... gc=CHROME chrome=CHROME opera=OPERA phantomjs=PHANTOMJS htmlunit=HTMLUNIT htmlunitwithjs=HTMLUNITWITHJS
63+
... android=ANDROID iphone=IPHONE safari=SAFARI
6764
${dc name}= Get From Dictionary ${dc names} ${BROWSER.lower().replace(' ', '')}
68-
${caps}= Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.${dc name}
69-
... selenium.webdriver,sys
65+
${caps}= Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.${dc name} selenium.webdriver,sys
7066
${url as str}= Evaluate str('${REMOTE_URL}') # cannot be unicode for versions >= 2.32
7167
${kwargs}= Create Dictionary
72-
Run Keyword If "${name}"=="Remote" Set To Dictionary ${kwargs} command_executor
73-
... ${url as str} desired_capabilities ${caps}
68+
Run Keyword If "${name}"=="Remote" Set To Dictionary ${kwargs} command_executor ${url as str} desired_capabilities
69+
... ${caps}
7470
Set Test Variable ${KWARGS} ${kwargs}
7571

7672
Normalize Browser Name

0 commit comments

Comments
 (0)