Skip to content

Commit 20f189c

Browse files
authored
Merge pull request #1848 from emanlove/hotfix-sel-v4_10_0
Hotfix sel v4 10 0
2 parents 9823418 + 49fb16b commit 20f189c

17 files changed

+391
-197
lines changed

atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ${event_firing_or_none} ${NONE}
1212
Open Browser To Start Page
1313
[Tags] NoGrid
1414
[Documentation]
15-
... LOG 1:20 DEBUG Wrapping driver to event_firing_webdriver.
16-
... LOG 1:22 INFO Got driver also from SeleniumLibrary.
15+
... LOG 1:37 DEBUG Wrapping driver to event_firing_webdriver.
16+
... LOG 1:39 INFO Got driver also from SeleniumLibrary.
1717
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
1818
... desired_capabilities=${DESIRED_CAPABILITIES}
1919

atest/acceptance/create_webdriver.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Library Collections
77
Create Webdriver Creates Functioning WebDriver
88
[Documentation]
99
... LOG 1:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver.
10-
... LOG 1:8 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+.
10+
... LOG 1:25 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+.
1111
[Tags] Known Issue Internet Explorer Known Issue Safari
1212
[Setup] Set Driver Variables
1313
Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS}

atest/acceptance/keywords/element_focus.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ Submit Button Should Be Focused
7878

7979
Set Focus To Element
8080
[Setup] Go To Page "mouse/index.html"
81-
Set Focus To Element el_for_focus
81+
Set Focus To Element id:el_for_focus
8282
Textfield Value Should Be el_for_focus focus el_for_focus
8383
Element Should Be Focused el_for_focus

atest/acceptance/keywords/lists.robot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,26 +112,26 @@ Select From Single Selection List
112112

113113
Select Non-Existing Item From Single Selection List
114114
Run Keyword And Expect Error
115-
... NoSuchElementException: Message: Cannot locate option with value: not_there?
115+
... NoSuchElementException: Message: Cannot locate option with value: not_there*
116116
... Select From List By Value preferred_channel not_there no_way_there
117117
Run Keyword And Expect Error
118-
... NoSuchElementException: Message: Could not locate element with visible text: Tin Can Phone?
118+
... NoSuchElementException: Message: Could not locate element with visible text: Tin Can Phone*
119119
... Select From List By Label preferred_channel Tin Can Phone
120120

121121
Select Non-Existing Item From Multi-Selection List
122122
Run Keyword And Expect Error
123-
... NoSuchElementException: Message: Cannot locate option with value: TinCanPhone?
123+
... NoSuchElementException: Message: Cannot locate option with value: TinCanPhone*
124124
... Select From List By value possible_channels TinCanPhone SmokeSignals
125125
Run Keyword And Expect Error
126-
... NoSuchElementException: Message: Could not locate element with visible text: Tin Can Phone?
126+
... NoSuchElementException: Message: Could not locate element with visible text: Tin Can Phone*
127127
... Select From List By Label possible_channels Tin Can Phone Email Smoke Signals
128128

129129
Unselect Non-Existing Item From List
130130
Run Keyword And Expect Error
131-
... NoSuchElementException: Message: Could not locate element with value: Tin Can Phone?
131+
... NoSuchElementException: Message: Could not locate element with value: Tin Can Phone*
132132
... Unselect From List By Value possible_channels Tin Can Phone Smoke Signals
133133
Run Keyword And Expect Error
134-
... NoSuchElementException: Message: Could not locate element with visible text: Tin Can Phone?
134+
... NoSuchElementException: Message: Could not locate element with visible text: Tin Can Phone*
135135
... Unselect From List By Label possible_channels Tin Can Phone Smoke Signals Email
136136

137137
Select From Multiselect List

atest/acceptance/keywords/page_load_timeout.robot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Test Teardown Close Browser And Reset Page Load Timeout
77
*** Test Cases ***
88
Should Open Browser With Default Page Load Timeout
99
[Documentation] Verify that 'Open Browser' changes the page load timeout.
10-
... LOG 1.1.1:16 DEBUG REGEXP: POST http://localhost:\\d{2,5}/session/[a-f0-9-]+/timeouts {"pageLoad": 300000}
11-
... LOG 1.1.1:18 DEBUG STARTS: Remote response: status=200
10+
... LOG 1.1.1:33 DEBUG REGEXP: POST http://localhost:\\d{2,5}/session/[a-f0-9-]+/timeouts {"pageLoad": 300000}
11+
... LOG 1.1.1:35 DEBUG STARTS: Remote response: status=200
1212
Open Browser To Start Page
1313

1414
Should Run Into Timeout Exception
1515
[Documentation]
16-
... FAIL REGEXP: TimeoutException: Message: (timeout: Timed out receiving message from renderer|TimedPromise timed out).*
16+
... FAIL REGEXP: TimeoutException: Message: (timeout: Timed out receiving message from renderer|TimedPromise timed out|Navigation timed out after).*
1717
Open Browser To Start Page
1818
Set Selenium Page Load Timeout 1 ms
1919
Reload Page

atest/acceptance/multiple_browsers_options.robot

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,32 @@ Documentation Creating test which would work on all browser is not possible.
99
*** Test Cases ***
1010
Chrome Browser With Selenium Options As String
1111
[Documentation]
12-
... LOG 1:3 DEBUG GLOB: *"goog:chromeOptions"*
13-
... LOG 1:3 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
12+
... LOG 1:20 DEBUG GLOB: *"goog:chromeOptions"*
13+
... LOG 1:20 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
1414
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
1515
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("--disable-dev-shm-usage")
1616

1717
Chrome Browser With Selenium Options As String With Attirbute As True
1818
[Documentation]
19-
... LOG 1:3 DEBUG GLOB: *"goog:chromeOptions"*
20-
... LOG 1:3 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
21-
... LOG 1:3 DEBUG GLOB: *"--headless"*
19+
... LOG 1:20 DEBUG GLOB: *"goog:chromeOptions"*
20+
... LOG 1:20 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
21+
... LOG 1:20 DEBUG GLOB: *"--headless"*
2222
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
2323
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; headless = True
2424

2525
Chrome Browser With Selenium Options With Complex Object
2626
[Tags] NoGrid
2727
[Documentation]
28-
... LOG 1:3 DEBUG GLOB: *"goog:chromeOptions"*
29-
... LOG 1:3 DEBUG GLOB: *"mobileEmulation": {"deviceName": "Galaxy S5"*
30-
... LOG 1:3 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
28+
... LOG 1:20 DEBUG GLOB: *"goog:chromeOptions"*
29+
... LOG 1:20 DEBUG GLOB: *"mobileEmulation": {"deviceName": "Galaxy S5"*
30+
... LOG 1:20 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
3131
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
3232
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_experimental_option( "mobileEmulation" , { 'deviceName' : 'Galaxy S5'})
3333

3434
Chrome Browser With Selenium Options Object
3535
[Documentation]
36-
... LOG 2:3 DEBUG GLOB: *"goog:chromeOptions"*
37-
... LOG 2:3 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
36+
... LOG 2:20 DEBUG GLOB: *"goog:chromeOptions"*
37+
... LOG 2:20 DEBUG GLOB: *args": ["--disable-dev-shm-usage"?*
3838
${options} = Get Chrome Options
3939
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
4040
... desired_capabilities=${DESIRED_CAPABILITIES} options=${options}
@@ -47,7 +47,7 @@ Chrome Browser With Selenium Options Invalid Method
4747

4848
Chrome Browser With Selenium Options Argument With Semicolon
4949
[Documentation]
50-
... LOG 1:3 DEBUG GLOB: *"goog:chromeOptions"*
51-
... LOG 1:3 DEBUG GLOB: *["has;semicolon"*
50+
... LOG 1:20 DEBUG GLOB: *"goog:chromeOptions"*
51+
... LOG 1:20 DEBUG GLOB: *["has;semicolon"*
5252
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
5353
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("has;semicolon")

atest/acceptance/open_and_close.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Close Browser Does Nothing When No Browser Is Opened
1616

1717
Browser Open With Not Well-Formed URL Should Close
1818
[Documentation] Verify after incomplete 'Open Browser' browser closes
19-
... LOG 1.1:24 DEBUG STARTS: Opened browser with session id
20-
... LOG 1.1:24 DEBUG REGEXP: .*but failed to open url.*
19+
... LOG 1.1:41 DEBUG STARTS: Opened browser with session id
20+
... LOG 1.1:41 DEBUG REGEXP: .*but failed to open url.*
2121
... LOG 2:2 DEBUG STARTS: DELETE
2222
... LOG 2:5 DEBUG STARTS: Finished Request
2323
Run Keyword And Expect Error * Open Browser bad.url.bad ${BROWSER}

requirements-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
invoke >= 1.4.1
44
mockito >= 1.2.2
55
robotstatuschecker >= 2.0.3
6-
approvaltests == 3.1.0
6+
approvaltests == 8.4.1
77
empty_files >= 0.0.3
88
pytest >= 6.0.2
99
pytest-mockito >= 0.0.4
10-
pytest-approvaltests >= 0.1.0
10+
pytest-approvaltests >= 0.2.0
1111
requests >= 2.24.0
1212
robotframework-pabot >= 1.10.0
1313
black >= 20.8b1

src/SeleniumLibrary/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
from SeleniumLibrary.utils import LibraryListener, is_truthy, _convert_timeout, _convert_delay
5252

5353

54-
__version__ = "6.2.0.dev1"
54+
__version__ = "6.1.1.dev1"
5555

5656

5757
class SeleniumLibrary(DynamicCore):

src/SeleniumLibrary/keywords/browsermanagement.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,9 @@ def open_browser(
114114
Optional ``remote_url`` is the URL for a
115115
[https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid].
116116
117-
Optional ``desired_capabilities`` can be used to configure, for example,
118-
logging preferences for a browser or a browser and operating system
119-
when using [http://saucelabs.com|Sauce Labs]. Desired capabilities can
120-
be given either as a Python dictionary or as a string in the format
121-
``key1:value1,key2:value2``.
122-
[https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities|
123-
Selenium documentation] lists possible capabilities that can be
124-
enabled.
117+
Optional ``desired_capabilities`` is deprecated and will be ignored. Capabilities of each
118+
individual browser is now done through options or services. Please refer to those arguments
119+
for configuring specific browsers.
125120
126121
Optional ``ff_profile_dir`` is the path to the Firefox profile
127122
directory if you wish to overwrite the default profile Selenium
@@ -288,6 +283,8 @@ def open_browser(
288283
if url:
289284
self.go_to(url)
290285
return index
286+
if desired_capabilities:
287+
self.warn("desired_capabilities has been deprecated and removed. Please use options to configure browsers as per documentation.")
291288
return self._make_new_browser(
292289
url,
293290
browser,

0 commit comments

Comments
 (0)