Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webdriver-bootstrap.js #12276

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions javascript/webdriver-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,27 @@
// about an undefined symbol.
window.webdriver = {};

var scripts = document.getElementsByTagName('script');
var directoryPath = './';
var thisFile = 'webdriver-bootstrap.js';
let scripts = document.getElementsByTagName('script');
let directoryPath = './';
let thisFile = 'webdriver-bootstrap.js';

for (var i = 0; i < scripts.length; i++) {
var src = scripts[i].src;
var len = src.length;
for (let i = 0; i < scripts.length; i++) {
let src = scripts[i].src;
let len = src.length;
if (src.substr(len - thisFile.length) == thisFile) {
directoryPath = src.substr(0, len - thisFile.length);
directoryPath = src.substr(0, len - thisFile.length);
break;
}
}

// All of the files to load. Files are specified in the order they must be
// loaded, NOT alphabetical order.
var webdriverFiles = [
const webdriverFiles = [
'../../third_party/closure/goog/base.js',
'deps.js'
];

for (var j = 0; j < webdriverFiles.length; j++) {
for (let j = 0; j < webdriverFiles.length; j++) {
document.write('<script type="text/javascript" src="' +
directoryPath + webdriverFiles[j] + '"></script>');
}
Expand Down