Skip to content

Commit

Permalink
Update Selenium to 4.11 (#3882)
Browse files Browse the repository at this point in the history
* Update Selenium to 4.11

* fix safari driver tests

---------

Co-authored-by: Ravi Sawlani <ravisawlani04@gmail.com>
  • Loading branch information
AutomatedTester and gravityvi committed Aug 17, 2023
1 parent 6976c6a commit 1c54cab
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"open": "8.4.0",
"ora": "5.4.1",
"piscina": "^3.2.0",
"selenium-webdriver": "~4.10.0",
"selenium-webdriver": "~4.11.0",
"semver": "7.5.2",
"stacktrace-parser": "0.1.10",
"strip-ansi": "6.0.1",
Expand Down
26 changes: 13 additions & 13 deletions test/src/service-builders/testSafariDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ describe('SafariDriver Transport Tests', function () {

},
async start() {
return 'http://localhost'
return 'http://localhost';
}
}
};
}
}

Expand All @@ -110,12 +110,12 @@ describe('SafariDriver Transport Tests', function () {
mockExecutor({
sessionId: '111',
getId() {
return '1111'
return '1111';
},
getCapabilities() {
return {
getPlatform() {
return 'MAC'
return 'MAC';
},
getBrowserName() {
return 'safari';
Expand All @@ -129,7 +129,7 @@ describe('SafariDriver Transport Tests', function () {
keys() {
return new Map();
}
}
};
}
});

Expand Down Expand Up @@ -198,7 +198,7 @@ describe('SafariDriver Transport Tests', function () {
session,
serverPath,
serverPort
}
};
}

it('test create session with safari driver', async function() {
Expand Down Expand Up @@ -264,15 +264,15 @@ describe('SafariDriver Transport Tests', function () {

it('session create should throw error after max retryAttempts', function() {

let testsPath = [
const testsPath = [
path.join(__dirname, '../../sampletests/async')
];

MockServer.addMock({
url: '/session',
statusCode: 500,
postdata: JSON.stringify({
'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'safari'}}
'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'safari', 'safari:options': {}}}
}),
response: JSON.stringify({
value: {
Expand All @@ -283,7 +283,7 @@ describe('SafariDriver Transport Tests', function () {
times: 2
});

let globals = {
const globals = {
reporter(results) {
const sep = path.sep;
assert.strictEqual(results.errors, 1);
Expand Down Expand Up @@ -314,15 +314,15 @@ describe('SafariDriver Transport Tests', function () {
});

it('session create should retry on internal server error (500)', function() {
let testsPath = [
const testsPath = [
path.join(__dirname, '../../sampletests/async')
];

MockServer.addMock({
url: '/session',
statusCode: 500,
postdata: JSON.stringify({
'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'safari'}}
'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'safari', 'safari:options': {}}}
}),
response: JSON.stringify({
value: {
Expand All @@ -337,7 +337,7 @@ describe('SafariDriver Transport Tests', function () {
url: '/session',
statusCode: 200,
postdata: JSON.stringify({
'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'safari'}}
'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'safari', 'safari:options': {}}}
}),
response: JSON.stringify({
value: {
Expand All @@ -351,7 +351,7 @@ describe('SafariDriver Transport Tests', function () {
times: 1
});

let globals = {
const globals = {
reporter(results) {
const sep = path.sep;
assert.strictEqual(results.errors, 0);
Expand Down

0 comments on commit 1c54cab

Please sign in to comment.