mirror of
https://github.com/appium/appium.git
synced 2026-01-13 13:50:00 -06:00
Selenium grid fix: resolves 5902
This commit is contained in:
@@ -66,7 +66,8 @@ async function postRequest (data, addr, port) {
|
||||
url: `http://${jsonObject.configuration.hubHost}:${jsonObject.configuration.hubPort}/grid/register`,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
headers: post_headers
|
||||
headers: post_headers,
|
||||
resolveWithFullResponse: true // return the full response, not just the body
|
||||
};
|
||||
|
||||
if (jsonObject.configuration.register !== true) {
|
||||
@@ -101,7 +102,8 @@ async function isAlreadyRegistered (jsonObject) {
|
||||
let response = await request({
|
||||
uri: `http://${jsonObject.configuration.hubHost}:${jsonObject.configuration.hubPort}/grid/api/proxy?id=${id}`,
|
||||
method : 'GET',
|
||||
timeout : 10000
|
||||
timeout : 10000,
|
||||
resolveWithFullResponse: true // return the full response, not just the body
|
||||
});
|
||||
if (response === undefined || response.statusCode !== 200) {
|
||||
throw new Error(`Request failed`);
|
||||
|
||||
Reference in New Issue
Block a user