Skip to content

Commit 134af92

Browse files
authored
feat: drop /wd/hub from the default url config (#1055)
* feat: drop /wd/hub legacy path * add changelog
1 parent 1f7f8cb commit 134af92

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

.github/workflows/functional-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
appium driver install xcuitest
5656
appium plugin install [email protected]
5757
appium plugin install execute-driver
58-
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors --base-path=/wd/hub > appium.log &
58+
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
5959
6060
- name: Set up Ruby
6161
uses: ruby/setup-ruby@v1

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Commit based release not is [release_notes.md](./release_notes.md)
33

44
Release tags are https://github.com/appium/ruby_lib/releases .
55

6+
## not yet
7+
- Use `http://127.0.0.1:4723` as the default url destination instead of `http://127.0.0.1:4723/wd/hub`
8+
69
## 15.2.2 - 2024-08-06
710
- Fix non `app` capability behavior
811

android_tests/lib/android/specs/driver.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_05_attributes_verify_all_attributes
5454

5555
expected = {
5656
automation_name: :uiautomator2,
57-
custom_url: 'http://127.0.0.1:4723/wd/hub',
57+
custom_url: 'http://127.0.0.1:4723',
5858
default_wait: 1,
5959
sauce_username: nil,
6060
sauce_access_key: nil,

grid/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"cleanUpCycle": 2000,
1414
"timeout": 60000,
1515
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
16-
"url": "http://localhost:4723/wd/hub",
16+
"url": "http://localhost:4723",
1717
"host": "localhost",
1818
"port": 4723,
1919
"maxSession": 1,

grid/hub_config_3.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"port": 4444,
1414
"register": true,
1515
"registerCycle": 5000,
16-
"hub": "http://localhost:4444/wd/hub",
16+
"hub": "http://localhost:4444",
1717
"nodeStatusCheckTimeout": 5000,
1818
"nodePolling": 5000,
1919
"role": "hub",

ios_tests/lib/ios/specs/driver.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def test_04_verify_all_attributes
6363
end
6464

6565
def test_05_verify_attributes_are_immutable
66-
assert_equal driver_attributes[:custom_url], 'http://127.0.0.1:4723/wd/hub'
66+
assert_equal driver_attributes[:custom_url], 'http://127.0.0.1:4723'
6767
driver_attributes[:custom_url] = true
68-
assert_equal driver_attributes[:custom_url], 'http://127.0.0.1:4723/wd/hub'
68+
assert_equal driver_attributes[:custom_url], 'http://127.0.0.1:4723'
6969
end
7070

7171
def test_06_verify_attribute_of_caps_are_not_immutable_because_it_depends_on_selenium

ios_tests/parallel/test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def des_server_caps
1818
{
1919
debug: true,
20-
server_url: "#{ENV['appium_server'] ||= 'http://127.0.0.1:4723'}/wd/hub",
20+
server_url: ENV['appium_server'] ||= 'http://127.0.0.1:4723',
2121
wait: 25,
2222
wait_timeout: 20,
2323
wait_interval: 0.3

lib/appium_lib/driver.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def server_url
427427
return @core.custom_url if @core.custom_url
428428
return @sauce.server_url if @sauce.sauce_server_url?
429429

430-
"http://127.0.0.1:#{@core.port}/wd/hub"
430+
"http://127.0.0.1:#{@core.port}"
431431
end
432432

433433
# Restarts the driver

readme.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ $ appium driver install xcuitest # proper driver name to install
3737
$ appium server
3838
```
3939

40-
> **Note** Please set `server_url` properly like the below since the appium 2
41-
> changed the default WebDriver URL to without `/wd/hub` to follow W3C.
40+
> **Note** Please set `server_url` properly like the below for Appium v1.
4241
> ```
4342
> opts = {
4443
> caps: {
@@ -47,13 +46,12 @@ $ appium server
4746
> app: '/path/to/MyiOS.app'
4847
> },
4948
> appium_lib: {
50-
> server_url: 'http://127.0.0.1:4723'
49+
> server_url: 'http://127.0.0.1:4723/wd/hub'
5150
> }
5251
> }
5352
> appium_driver = Appium::Driver.new(opts)
5453
> appium_driver.start_driver
5554
> ```
56-
> Or please start the appium server with `appium server --base-path=/wd/hub`
5755
5856
### Appium 1
5957
```bash

0 commit comments

Comments
 (0)