Skip to content

Commit 1a12a4d

Browse files
authored
Merge pull request #1899 from aaltat/fizes_for_mac
Make test run on Mac
2 parents 7d8295b + ea75a82 commit 1a12a4d

File tree

12 files changed

+64
-52
lines changed

12 files changed

+64
-52
lines changed

atest/acceptance/1-plugin/plugin_does_not_exist.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Variables ***
2-
${SERVER}= localhost:7000
2+
${SERVER}= localhost:${PORT}
33
${BROWSER}= firefox
44
${REMOTE_URL}= ${NONE}
55
${ROOT}= http://${SERVER}/html

atest/acceptance/1-plugin/plugin_open_browser.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Library SeleniumLibrary plugins=${CURDIR}/OpenBrowserExample.py
33

44
*** Variables ***
5-
${SERVER}= localhost:7000
5+
${SERVER}= localhost:${PORT}
66
${ROOT}= http://${SERVER}/html
77
&{EXTRA DICTIONARY} extra=dictionary key=value
88

atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
*** Settings ***
22
Library SeleniumLibrary event_firing_webdriver=${CURDIR}/../../resources/testlibs/MyListener.py
33
Resource resource_event_firing_webdriver.robot
4-
Suite Setup Open Browser ${FRONT PAGE} ${BROWSER} alias=event_firing_webdriver
4+
Suite Setup Open Browser ${FRONT_PAGE} ${BROWSER} alias=event_firing_webdriver
55
... remote_url=${REMOTE_URL}
66
Suite Teardown Close All Browsers
77

@@ -14,7 +14,7 @@ Open Browser To Start Page
1414
[Documentation]
1515
... LOG 1:31 DEBUG Wrapping driver to event_firing_webdriver.
1616
... LOG 1:33 INFO Got driver also from SeleniumLibrary.
17-
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
17+
Open Browser ${FRONT_PAGE} ${BROWSER} remote_url=${REMOTE_URL}
1818

1919
Event Firing Webdriver Go To (WebDriver)
2020
[Tags] NoGrid
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
*** Variables ***
2-
${SERVER}= localhost:7000
3-
${BROWSER}= Chrome
4-
${REMOTE_URL}= ${NONE}
5-
${DESIRED_CAPABILITIES}= ${NONE}
6-
${ROOT}= http://${SERVER}/html
7-
${FRONT_PAGE}= ${ROOT}/
1+
*** Settings ***
2+
Resource ../variables.robot
83

94
*** Keywords ***
10-
115
Go To Page "${relative url}"
126
[Documentation] Goes to page
137
Go To ${ROOT}/${relative url}
14-

atest/acceptance/keywords/click_element_modifier.robot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ Resource ../resource.robot
55

66
*** Test Cases ***
77
Click Element Modifier CTRL
8+
[Tags] SKIP_ON_MAC
89
Click Element Button modifier=CTRL
910
Element Text Should Be output CTRL click
1011

1112
Click Link Modifier CTRL
13+
[Tags] SKIP_ON_MAC
1214
Click Link link text modifier=CTRL
1315
Element Text Should Be output CTRL click
1416
[Teardown] Close Popup Window
1517

1618
Click Button Modifier CTRL
19+
[Tags] SKIP_ON_MAC
1720
Click Button Click me! modifier=CTRL
1821
Element Text Should Be output CTRL click
1922

2023
Click Image Modifier CTRL
24+
[Tags] SKIP_ON_MAC
2125
Click Image robot modifier=CTRL
2226
Element Text Should Be output CTRL click
2327

@@ -46,7 +50,7 @@ Click Element Action Chain and modifier
4650
[Documentation] LOG 1:1 INFO Clicking element 'Button' with CTRL.
4751
Click Element Button modifier=CTRL action_chain=True
4852
Element Text Should Be output CTRL click
49-
53+
5054
*** Keywords ***
5155
Initialize Page
5256
Reload Page

atest/acceptance/keywords/elements.robot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Get DOM Attribute
9090
Should Be Equal ${id} some_id
9191
# Test custom attribute
9292
${existing_custom_attr}= Get DOM Attribute id:emptyDiv data-id
93-
Should Be Equal ${existing_custom_attr} my_id
93+
Should Be Equal ${existing_custom_attr} my_id
9494
${doesnotexist_custom_attr}= Get DOM Attribute id:emptyDiv data-doesnotexist
9595
Should Be Equal ${doesnotexist_custom_attr} ${None}
9696
# Get non existing DOM Attribute
@@ -156,7 +156,7 @@ Get Element Attribute And Element Attribute Value Should Be Should have same res
156156
Element Attribute Value Should Be css=#second_div class ${attribute_value}
157157

158158
Get Element Attribute Value Should Be Should Be Succesfull with non-ascii characters
159-
Element Attribute Value Should Be link=Link with Unicode äöüÄÖÜß href http://localhost:7000/html/index.html
159+
Element Attribute Value Should Be link=Link with Unicode äöüÄÖÜß href ${FRONT_PAGE}index.html
160160

161161
Get Element Attribute Value Should Be Should Be Succesfull error and error messages
162162
Run Keyword And Expect Error
@@ -169,8 +169,8 @@ Get Element Attribute Value Should Be Should Be Succesfull error and error messa
169169
... Element with locator 'id=non_existing' not found.
170170
... Element Attribute Value Should Be id=non_existing href http://non_existing.com
171171
Run Keyword And Expect Error
172-
... Element 'link=Target opens in new window' attribute should have value 'http://localhost:7000/html/indéx.html' (str) but its value was 'http://localhost:7000/html/index.html' (str).
173-
... Element Attribute Value Should Be link=Target opens in new window href http://localhost:7000/html/indéx.html
172+
... Element 'link=Target opens in new window' attribute should have value '${FRONT_PAGE}indéx.html' (str) but its value was '${FRONT_PAGE}index.html' (str).
173+
... Element Attribute Value Should Be link=Target opens in new window href ${FRONT_PAGE}indéx.html
174174

175175
Get Horizontal Position
176176
${pos}= Get Horizontal Position link=Link

atest/acceptance/keywords/location.robot

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ Wait Until Location Contains At The End
4444
Wait Until Location Contains In The Middle
4545
[Setup] Go To Page "javascript/wait_location.html"
4646
Click Element button
47-
Wait Until Location Contains 7000
47+
Wait Until Location Contains ${PORT}
4848

4949
Wait Until Location Contains As Number
5050
[Setup] Go To Page "javascript/wait_location.html"
5151
Click Element button
52-
Wait Until Location Contains ${7000}
52+
${number} Convert To Integer ${PORT}
53+
Wait Until Location Contains ${number}
5354

5455
Wait Until Location Contains Fails
5556
[Setup] Go To Page "javascript/wait_location.html"
@@ -70,7 +71,7 @@ Wait Until Location Contains Fails With Timeout
7071
Wait Until Location Is
7172
[Setup] Go To Page "javascript/wait_location.html"
7273
Click Element button
73-
Wait Until Location Is http://localhost:7000/html/
74+
Wait Until Location Is ${FRONT_PAGE}
7475

7576
Wait Until Location Is Fails
7677
[Setup] Go To Page "javascript/wait_location.html"
@@ -91,23 +92,23 @@ Wait Until Location Is Fails With Timeout
9192
Wait Until Location Is Not
9293
[Setup] Go To Page "javascript/wait_location.html"
9394
Click Element button
94-
Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html
95+
Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html
9596

9697
Wait Until Location Is Not Fail
9798
[Setup] Go To Page "javascript/wait_location.html"
9899
${orig_timeout}= Set Selenium Timeout 2 s
99100
Run Keyword And Expect Error
100-
... Location is 'http://localhost:7000/html/javascript/wait_location.html' in 2 seconds.
101-
... Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html
101+
... Location is '${FRONT_PAGE}javascript/wait_location.html' in 2 seconds.
102+
... Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html
102103
Set Selenium Timeout ${orig_timeout}
103104

104105
Wait Until Location Is Not Fails With Timeout
105106
[Setup] Go To Page "javascript/wait_location.html"
106107
${orig_timeout}= Set Selenium Timeout 2 s
107108
Click Element button
108109
Run Keyword And Expect Error
109-
... Location is 'http://localhost:7000/html/javascript/wait_location.html' in 750 milliseconds.
110-
... Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html timeout=750ms
110+
... Location is '${FRONT_PAGE}javascript/wait_location.html' in 750 milliseconds.
111+
... Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html timeout=750ms
111112
Set Selenium Timeout ${orig_timeout}
112113

113114
Wait Until Location Is Not Fails With Message
@@ -116,7 +117,7 @@ Wait Until Location Is Not Fails With Message
116117
${orig_timeout}= Set Selenium Timeout 2 s
117118
Run Keyword And Expect Error
118119
... my_message
119-
... Wait Until Location Is Not http://localhost:7000/html/javascript/wait_location.html message=my_message
120+
... Wait Until Location Is Not ${FRONT_PAGE}javascript/wait_location.html message=my_message
120121
Set Selenium Timeout ${orig_timeout}
121122

122123
Wait Until Location Does Not Contain
@@ -143,9 +144,10 @@ Wait Until Location Does Not Contain Fail In The Middle
143144
Wait Until Location Does Not Contain Fail As Number
144145
[Setup] Go To Page "javascript/wait_location.html"
145146
${orig_timeout}= Set Selenium Timeout 2 s
147+
${number} Convert To Integer ${PORT}
146148
run keyword and expect error
147-
... Location did contain '${7000}' in 2 seconds.
148-
... Wait Until Location Does Not Contain ${7000}
149+
... Location did contain '${number}' in 2 seconds.
150+
... Wait Until Location Does Not Contain ${number}
149151
Set Selenium Timeout ${orig_timeout}
150152

151153
Wait Until Location Does Not Contain Fail At The End

atest/acceptance/resource.robot

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ Library SeleniumLibrary run_on_failure=Nothing implicit_wait=0.2
33
Library Collections
44
Library OperatingSystem
55
Library DateTime
6-
7-
*** Variables ***
8-
${SERVER}= localhost:7000
9-
${BROWSER}= firefox
10-
${REMOTE_URL}= ${NONE}
11-
${DESIRED_CAPABILITIES}= ${NONE}
12-
${ROOT}= http://${SERVER}/html
13-
${FRONT_PAGE}= ${ROOT}/
14-
${SPEED}= 0
6+
Resource variables.robot
157

168
*** Keywords ***
179
Open Browser To Start Page

atest/acceptance/variables.robot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*** Variables ***
2+
${PORT}= 7000
3+
${SERVER}= localhost:${PORT}
4+
${BROWSER}= firefox
5+
${REMOTE_URL}= ${NONE}
6+
${DESIRED_CAPABILITIES}= ${NONE}
7+
${ROOT}= http://${SERVER}/html
8+
${FRONT_PAGE}= ${ROOT}/
9+
${SPEED}= 0

atest/resources/html/javascript/wait_location.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
setTimeout('doLocation()', 1000)
66
}
77
function doLocation() {
8-
self.location = 'http://localhost:7000/html/'
8+
var base_url = window.location.origin;
9+
self.location = `${base_url}/html/`
910
}
1011
</script>
1112
<head>

0 commit comments

Comments
 (0)