Skip to content

[🐛 Bug]: Unsupported Operation Exception For Getting Default Value From A Disabled Select Box #11181

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

Closed
chik145 opened this issue Oct 27, 2022 · 3 comments
Labels
A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended

Comments

@chik145
Copy link

chik145 commented Oct 27, 2022

What happened?

[🐛 Bug]: Unsupported Operation Exception For Getting Default Value From A Disabled Select Box

Getting
java.lang.UnsupportedOperationException: Select element is disabled and may not be used.

How can we reproduce the issue?

when trying to fetch default value by calling ".getFirstSelectedOption()" function.

working fine till selenium 4.3 but not working on later versions (ex: 4.5)

![image](https://user-images.githubusercontent.com/26041357/198302860-9ac57db6-5bde-4bcc-bb95-31b0a406c114.png)

Relevant log output

java.lang.UnsupportedOperationException: Select element is disabled and may not be used.
	at org.openqa.selenium.support.ui.Select.<init>(Select.java:53)
	at framework.pageObjects.Base_Page.performAction(Base_Page.java:228)
	at framework.productConfig.USS_LVS_Config.initiateConfiguration(USS_LVS_Config.java:93)
	at framework.productConfig.USS_LVS_Config.provideConfigurationData(USS_LVS_Config.java:167)
	at tests.stepDef.StepDef_USS_E2E.user_added_from_product_family_from__lvs_uss(StepDef_USS_E2E.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at io.cucumber.java.Invoker.doInvoke(Invoker.java:66)
	at io.cucumber.java.Invoker.invoke(Invoker.java:24)
	at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
	at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29)
	at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66)
	at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63)
	at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
	at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:85)
	at io.cucumber.core.runner.TestStep.run(TestStep.java:57)
	at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51)
	at io.cucumber.core.runner.TestCase.run(TestCase.java:84)
	at io.cucumber.core.runner.Runner.runPickle(Runner.java:75)
	at io.cucumber.junit.PickleRunners$WithStepDescriptions.lambda$run$1(PickleRunners.java:109)
	at io.cucumber.junit.PickleRunners$WithStepDescriptions$$Lambda$213/1337654882.accept(Unknown Source)
	at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$5(CucumberExecutionContext.java:129)
	at io.cucumber.core.runtime.CucumberExecutionContext$$Lambda$216/221480761.run(Unknown Source)
	at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23)
	at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:129)
	at io.cucumber.junit.PickleRunners$WithStepDescriptions.run(PickleRunners.java:106)
	at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:144)
	at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:28)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at io.cucumber.junit.FeatureRunner.run(FeatureRunner.java:137)
	at io.cucumber.junit.Cucumber.runChild(Cucumber.java:196)
	at io.cucumber.junit.Cucumber.runChild(Cucumber.java:89)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:398)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Operating System

Win 10

Selenium version

4.5

What are the browser(s) and version(s) where you see this issue?

chrome 105

What are the browser driver(s) and version(s) where you see this issue?

latest by webdrive rmanager

Are you using Selenium Grid?

no

@chik145 chik145 added I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels Oct 27, 2022
@pujagani
Copy link
Contributor

Thank you for the details. We are aware of the issue and based on the decision made by the Selenium contributors, this will be fixed as a part of #11124.

@pujagani
Copy link
Contributor

Duplicate of #10812

@pujagani pujagani marked this as a duplicate of #10812 Oct 28, 2022
@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 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants