I just copied an example from BrowserStack Selenium, installed selenium webdriver as documentation said and tired to run it under IE11.
const webdriver = require('selenium-webdriver');
const capabilities = {
'browserName': 'IE',
'browser_version': '11.0',
'os': 'Windows',
'os_version': '10',
'resolution': '1440x900',
'browserstack.user': 'xxx',
'browserstack.key': 'xxx',
'name': 'Bstack-[Node] Sample Test'
}
const driver = new webdriver.Builder()
.usingServer('http://hub-cloud.browserstack.com/wd/hub')
.withCapabilities(capabilities)
.build();
driver
.get('https://my-address')
.catch((e) => {
console.log(e)
});
driver.getTitle().then((title) => {
console.log(title);
driver.quit();
}).catch((e) => {
console.log(e)
driver.quit();
});
And I got an error:
UnsupportedOperationError: get: Error 404: Not Found
File not found
at parseHttpResponse (/node_modules/selenium-webdriver/lib/http.js:578:11)
at Executor.execute (/node_modules/selenium-webdriver/lib/http.js:489:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async thenableWebDriverProxy.execute (/node_modules/selenium-webdriver/lib/webdriver.js:699:17) {
name: 'UnsupportedOperationError',
remoteStacktrace: ''
}
I do not know what can I say more. StackOverflow does not allow me to add this post because that my post is mostly code so I wrote this sentence.
Hi, did you find a fix for this?
RépondreSupprimer