-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed as not planned
Closed as not planned
Copy link
Labels
I-defectSomething is not working as intendedSomething is not working as intendedJ-issue-templateApplied to issues not following the template, or missing information.Applied to issues not following the template, or missing information.
Description
What happened?
IWebDriver.ExecuteJavaScript throws exception when passing IWebElement as argument
driver.ExecuteJavaScript($"arguments[0].value = '{value}'", element); System.InvalidOperationException : javascript error: Cannot set properties of undefined (setting 'value')
(Session info: chrome=131.0.6778.70)
(Driver info: chromedriver=131.0.6778.69 (77e2244bbcda3ab9362d5b8aeeb006a86a6d4832-refs/branch-heads/6778@{#2141}),platform=Windows NT 10.0.19045 x86_64) (UnexpectedJavaScriptError)
How can we reproduce the issue?
var driver = new ChromeDriver();
string value = "testValue";
driver.Navigate().GoToUrl("http://uitestingplayground.com/textinput");
Thread.Sleep(1000);
var element = driver.FindElementById("newButtonName");
driver.ExecuteJavaScript($"arguments[0].value = '{value}'", element);Relevant log output
(Session info: chrome=131.0.6778.70)
(Driver info: chromedriver=131.0.6778.69 (77e2244bbcda3ab9362d5b8aeeb006a86a6d4832-refs/branch-heads/6778@{#2141}),platform=Windows NT 10.0.19045 x86_64) (UnexpectedJavaScriptError)Operating System
Windows 11
Selenium version
dotnet 472
What are the browser(s) and version(s) where you see this issue?
131.0.6778.70
What are the browser driver(s) and version(s) where you see this issue?
131.0.6778.69
Are you using Selenium Grid?
No response
Metadata
Metadata
Assignees
Labels
I-defectSomething is not working as intendedSomething is not working as intendedJ-issue-templateApplied to issues not following the template, or missing information.Applied to issues not following the template, or missing information.