-
Notifications
You must be signed in to change notification settings - Fork 63
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
Error while running .executeScript() protocol action: Invalid Command #33
Comments
Hi @lunayui, can you share the capabilities used for the test, while retracting your credentials. I suspect that a JSONWire Protocol endpoint '/execute' was sent to what appears to a session using the newer W3C Webdriver Protocol, which expects the endpoint '/execute/sync' causing the error. JSONWire Protocol: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidexecute |
this is my nightwatch_config nightwatch_config = { module.exports = nightwatch_config; |
Hello, could you please try executing a test with Nightwatch v.1.3.4 and share the output? I executed a sample test and the command ".execute("document.readyState")"worked fine. Sample session: https://automate.browserstack.com/builds/fbb7c6463835662567d5feb4cd5215db4d26fbf7/sessions/354d6e134ef82a503bdf1342c1b8354043b23f6a?auth_token=20643b00980d140fa4175dab201dc56cf1ae46ba6d14fb7ef824cc9362d2af8e |
Hello, I update Nightwatch v.1.3.4 and the latest but the error was change for :
|
Hey @lunayui I have reached out to you over email for further steps to get this working. |
Hi @shawnlobo96 I am stuck with a similar issue. Can you pls help me with the further steps too? |
Hello, Thank you for reaching out to us. We are working on your issue -706829 and will get back to you soon with an update. Please let us know if you have any more questions, we will be happy to help. Regards, Utkarsh Sharma BrowserStack Support BrowserStack Docs BrowserStack FAQs
On
Fri, 8 Jul at 9:10 AM
, browserstack/nightwatch-browserstack ***@***.***> wrote:
Hi @shawnlobo96 I am stuck with a similar issue. Can you pls help me with the further steps too?
Thanks!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I'm starting the BrowserStackLocal process via local.runner.js. and Nightwatch coverage code
But the build-in Jenkins is still failing and shows the error :
Response 500 POST https://hub-cloud.browserstack.com/wd/hub/execute (163ms)
{ value: { message: 'Invalid Command', error: [] } }
Error while running .executeScript() protocol action: Invalid Command
{ status: -1,
state: '',
value: { message: 'Invalid Command', error: [] },
errorStatus: '',
error: 'Invalid Command',
httpStatusCode: 500 }
Error: Error while running "execute" command: An error occurred while gathering coverage information
at
at process._tickCallback (internal/process/next_tick.js:189:7)
nightwatch.conf.js
globals_path: path.resolve(constants.NIGHTWATCH_CONFIGS_PATH, 'globals.js'), custom_commands_path: [ 'node_modules/nightwatch-coverage/commands' ],
global.js
`const path = require('path');
const { createCoverageReporter } = require('nightwatch-coverage');
const coverageReporter = createCoverageReporter({
coverageDirectory: path.join(process.cwd(), 'tests/colosseum/coverage'),
});
module.exports = {
coverageReporter,
abortOnAssertionFailure: true,
waitForConditionPollInterval: 500,
waitForConditionTimeout: 5000,
// executed after every test suite has ended
afterEach(browser,done) {
console.log("Nigthwach Browser " + browser.collectCoverage());
browser.collectCoverage(function () {
client.end(done);
});
},
//executed after the test run has finished
after(done) {
console.log("coverage report "+coverageReporter);
coverageReporter.save();
done();
}
}`
The text was updated successfully, but these errors were encountered: