Skip to content

Commit

Permalink
Update webdriver-bootstrap.js (#12276)
Browse files Browse the repository at this point in the history
Changing variables name only
  • Loading branch information
Aditya-PS-05 authored Jun 28, 2023
1 parent 2532076 commit ec65a7d
Showing 1 changed file with 9 additions and 9 deletions.
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

0 comments on commit ec65a7d

Please sign in to comment.