[🐛 Bug]: SelectElement not working after updating selenium webdriver 4 and IEDriverServer 4
See original GitHub issueWhat happened?
after updating selenium WebDriver (3.15 to 4.0.0) and IEDriver (3.150.1 to 4.0.0) getting below error while setting dropdown value, code was working properly with old selenium version (3): Error : Cannot click on option element. Executing JavaScript click function returned an unexpected error, but no error could be returned from Internet Explorer’s JavaScript engine
HTML :
C# code : public By countrySelector = By.Id(“selCountry”); public string Country { set => new SelectElement(Driver.FindElement(countrySelector )).SelectByText(value); }
Country= "India";
How can we reproduce the issue?
HTML :
<TD vAlign=top><SELECT id=selCountry">
<OPTION selected value=0>None</OPTION> <OPTION value=1>India</OPTION></SELECT>
</TD>
public By countrySelector = By.Id("selCountry");
public string Country
{
set => new SelectElement(Driver.FindElement(countrySelector )).SelectByText(value);
}
Country= "India";
Relevant log output
Cannot click on option element. Executing JavaScript click function returned an unexpected error, but no error could be returned from Internet Explorer's JavaScript engine
Operating System
Window server 2016
Selenium version
C# Selenium version 4 , IEDriver 4
What are the browser(s) and version(s) where you see this issue?
Internet Explorer 11
What are the browser driver(s) and version(s) where you see this issue?
IEDriver 4
Are you using Selenium Grid?
no
Issue Analytics
- State:
- Created 2 years ago
- Comments:50 (10 by maintainers)
Top Results From Across the Web
C# with Selenium: "SelectElement" does not exist in the ...
The error says: "SelectElement" does not exist in the current context. IWebDriver myDriver = new ChromeDriver(); IWebElement currency = myDriver ...
Read more >Migrating to Selenium 4: Here's What Has Changed - Applitools
A guide to notable changes and deprecations for engineers looking to migrate from Selenium 3 to Selenium 4. There is huge excitement within ......
Read more >Chrome Driver Issue while executing Selenium Tests
Hi all, I am executing some Selenium tests and I am getting the below error now.It was working fine until yesterday with same...
Read more >[Code example]-Selenium .net SelectElement Options, what is the ...
I'm not sure why you are using var instead of the specific data types. This works for me. public static IList<IWebElement> GetSelectListByID(string ...
Read more >java/CHANGELOG - external/github.com/SeleniumHQ/selenium - Git ...
Fix an error propagation bug when a command fails from bad inputs. ... Bump timeout for tests since a suite is also a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much you are an angel. I’m working in a bank too with a very old system and I couldn’t do my job because of this bug. I wrote it in python and this finally works for me.
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.