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

C-nodejs 4.0.0 Using submit on a WebElement causes error Cannot call non W3C standard command while in W3C mode #9916

Closed
doberkofler opened this issue Oct 13, 2021 · 5 comments

Comments

@doberkofler
Copy link

doberkofler commented Oct 13, 2021

🐛 Bug Report

When trying to use the submit method on a web element, the Cannot call non W3C standard command while in W3C mode exception is thrown.

https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/webdriver_exports_WebElement.html#submit

To Reproduce

const el = await page.findElement(By.css('form'));
await el.submit();

Expected behavior

This should not throw an exception.

Test script or set of commands reproducing this issue

Environment

OS: macOS 11.6
Browser:
Browser version:Chrome 94
Browser Driver version: ChromeDriver 94
Language Bindings version: nodejs 4.0.0
Selenium Grid version (if applicable):

@AutomatedTester
Copy link
Member

The message appears to be correct as that method has been removed. We need to update the bindings here.

@AutomatedTester
Copy link
Member

Fix for contributors wanting to try:

To solve this issue we need to add a new command to W3C_COMMAND_MAP that finds the form and then execute something like the python code does.

@doberkofler
Copy link
Author

@AutomatedTester Thank you for the feedback but what confused me most, ist the fast that it is also in the documentation and also has the TypeScript definitions.

@AutomatedTester
Copy link
Member

AutomatedTester commented Oct 14, 2021 via email

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2021
elgatov pushed a commit to elgatov/selenium that referenced this issue Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants