This repository has been archived by the owner. It is now read-only.

Enum missing #8083

Closed
lukeis opened this Issue Mar 4, 2016 · 21 comments

Comments

Projects
None yet
1 participant
@lukeis
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 8083

On upgrading my Maven 3 project from 2.43.1 to 2.44.0 attempting to test on a Windows
2012 platform I get the following exception and stacktrace for every test that attempts
to execute from NUnit 2.6.3:

**START STACKTRACE***
java.lang.IllegalArgumentException: No enum constant org.openqa.selenium.Platform.Windows
2012
    at java.lang.Enum.valueOf(Enum.java:238)
    at org.openqa.selenium.Platform.valueOf(Platform.java:30)
    at org.openqa.selenium.remote.DesiredCapabilities.setCapability(DesiredCapabilities.java:168)
    at au.com.fullcirclesolutions.saucery.capabilities.concreteproducts.DesktopCapabilities.<init>(DesktopCapabilities.java:15)
    at au.com.fullcirclesolutions.saucery.capabilities.concretecreators.DesktopCreator.Create(DesktopCreator.java:11)
    at au.com.fullcirclesolutions.saucery.capabilities.CapabilityFactory.CreateCapabilities(CapabilityFactory.java:15)
    at au.com.fullcirclesolutions.saucery.tests.SauceryBase.setUp(SauceryBase.java:65)
    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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:318)
    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)
***END STACKTRACE***

What steps will reproduce the problem?
1. Update pom.xml dependency version from 2.43.1 to 2.44.0
2. Attempt to test on Window 2012 platform
3. Get exception

What is the expected output? What do you see instead?
That the test executes on the requested platform as it does on 2.43.1

Selenium version:
OS: Windows 2012
Browser: Chrome
Browser version: 38

Test run on SauceLabs VM.

Downgrading back to 2.43.1 resolves the issue.  Tests run successfully on Windows 2012
platform.

Reported by andrew.paul.gray on 2014-10-24 11:36:33

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
What is "Windows 2012"? There never was such a value in the Platform enum. Where it
is coming from?

Reported by barancev on 2014-10-25 10:18:07

  • Status changed: NeedsClarification
Member

lukeis commented Mar 4, 2016

What is "Windows 2012"? There never was such a value in the Platform enum. Where it
is coming from?

Reported by barancev on 2014-10-25 10:18:07

  • Status changed: NeedsClarification
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Value is coming out of Sauce On demand plugin.  Not a problem in 2.43.1, only 2.44.0.

What changed between those two selenium versions to break this?

Reported by andrew.paul.gray on 2014-10-25 12:47:38

Member

lukeis commented Mar 4, 2016

Value is coming out of Sauce On demand plugin.  Not a problem in 2.43.1, only 2.44.0.

What changed between those two selenium versions to break this?

Reported by andrew.paul.gray on 2014-10-25 12:47:38

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Nothing changed, see the history [1] (release 2.43.1 is dated Sep 10).

Where exactly is the value "Windows 2012" coming from? I bet it should be "Windows
Server 2012" that is present in the Platform enum.

[1] https://github.com/SeleniumHQ/selenium/commits/master/java/client/src/org/openqa/selenium/Platform.java

Reported by barancev on 2014-10-25 15:29:57

Member

lukeis commented Mar 4, 2016

Nothing changed, see the history [1] (release 2.43.1 is dated Sep 10).

Where exactly is the value "Windows 2012" coming from? I bet it should be "Windows
Server 2012" that is present in the Platform enum.

[1] https://github.com/SeleniumHQ/selenium/commits/master/java/client/src/org/openqa/selenium/Platform.java

Reported by barancev on 2014-10-25 15:29:57

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
I got also:

java.lang.IllegalArgumentException: No enum constant org.openqa.selenium.Platform.Windows
8.1

java.lang.IllegalArgumentException: No enum constant org.openqa.selenium.Platform.Windows
7

Downgrading back to older version solved my case.

Reported by teijo.kalliomaki on 2014-10-27 06:47:20

Member

lukeis commented Mar 4, 2016

I got also:

java.lang.IllegalArgumentException: No enum constant org.openqa.selenium.Platform.Windows
8.1

java.lang.IllegalArgumentException: No enum constant org.openqa.selenium.Platform.Windows
7

Downgrading back to older version solved my case.

Reported by teijo.kalliomaki on 2014-10-27 06:47:20

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Yes, there are no constants like "org.openqa.selenium.Platform.Windows 7" (with the
package name), they have names like "Windows 7".

Please provide a complete executable scenario that would allow us to reproduce the
issue.

Reported by barancev on 2014-10-27 07:03:25

Member

lukeis commented Mar 4, 2016

Yes, there are no constants like "org.openqa.selenium.Platform.Windows 7" (with the
package name), they have names like "Windows 7".

Please provide a complete executable scenario that would allow us to reproduce the
issue.

Reported by barancev on 2014-10-27 07:03:25

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
I'm also using SauceLabs (tests built with maven,testng,java,selenium) to test.

Selected parts from the code:

capability=DesiredCapabilities.firefox();
capability.setCapability("platform", "Windows 8.1");
driver = new RemoteWebDriver(new URL("http://"+host+":"+port+"/wd/hub"),capability);

Reported by teijo.kalliomaki on 2014-10-27 07:43:56

Member

lukeis commented Mar 4, 2016

I'm also using SauceLabs (tests built with maven,testng,java,selenium) to test.

Selected parts from the code:

capability=DesiredCapabilities.firefox();
capability.setCapability("platform", "Windows 8.1");
driver = new RemoteWebDriver(new URL("http://"+host+":"+port+"/wd/hub"),capability);

Reported by teijo.kalliomaki on 2014-10-27 07:43:56

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
As far as I can tell, the change associated with the df9aa542b4bc commit (https://code.google.com/p/selenium/source/detail?r=df9aa542b4bce5824660bac2ca25166b835e60db)
causes the error.  Previously the code was allowing arbitrary platform values to be
specified, whereas now the code attempts to perform a lookup of the Platform enum value.

The https://saucelabs.com/platforms page lists the browser combinations supported by
Sauce Labs and the associated platform value which users are advised to supply. In
addition to requiring users/API calls to change the platform values included in the
DesiredCapabilities, the impact of this change is that any new platforms supported
by Sauce Labs will need to be included within the Platform enum before they can be
used, which is less than ideal.

Reported by piaross on 2014-10-27 08:09:28

Member

lukeis commented Mar 4, 2016

As far as I can tell, the change associated with the df9aa542b4bc commit (https://code.google.com/p/selenium/source/detail?r=df9aa542b4bce5824660bac2ca25166b835e60db)
causes the error.  Previously the code was allowing arbitrary platform values to be
specified, whereas now the code attempts to perform a lookup of the Platform enum value.

The https://saucelabs.com/platforms page lists the browser combinations supported by
Sauce Labs and the associated platform value which users are advised to supply. In
addition to requiring users/API calls to change the platform values included in the
DesiredCapabilities, the impact of this change is that any new platforms supported
by Sauce Labs will need to be included within the Platform enum before they can be
used, which is less than ideal.

Reported by piaross on 2014-10-27 08:09:28

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Ah, got it thanks! The fix is coming...

Reported by barancev on 2014-10-27 09:06:07

  • Status changed: Accepted
  • Labels added: Lang-Java
  • Labels removed: Status-Untriaged
Member

lukeis commented Mar 4, 2016

Ah, got it thanks! The fix is coming...

Reported by barancev on 2014-10-27 09:06:07

  • Status changed: Accepted
  • Labels added: Lang-Java
  • Labels removed: Status-Untriaged
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Thanks Ross,

Looks like you your comment pushed it over the edge to getting resolved.

Reported by andrew.paul.gray on 2014-10-27 09:29:43

Member

lukeis commented Mar 4, 2016

Thanks Ross,

Looks like you your comment pushed it over the edge to getting resolved.

Reported by andrew.paul.gray on 2014-10-27 09:29:43

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
This issue was closed by revision 396f25547a88.

Reported by barancev on 2014-10-27 09:33:36

  • Status changed: Fixed
Member

lukeis commented Mar 4, 2016

This issue was closed by revision 396f25547a88.

Reported by barancev on 2014-10-27 09:33:36

  • Status changed: Fixed
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Thanks! Also, we need more regression tests :) TBD

Reported by barancev on 2014-10-27 09:34:08

Member

lukeis commented Mar 4, 2016

Thanks! Also, we need more regression tests :) TBD

Reported by barancev on 2014-10-27 09:34:08

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Is that actually going to fix it, or just give us the nearest matching platform which
might not be the exact one we asked for?

What if Sauce Labs is actually relying on the value being a string?

I'm sticking with 2.43.1 until this is sorted out :)

Reported by andrew.herron@ephox.com on 2014-11-05 06:26:09

Member

lukeis commented Mar 4, 2016

Is that actually going to fix it, or just give us the nearest matching platform which
might not be the exact one we asked for?

What if Sauce Labs is actually relying on the value being a string?

I'm sticking with 2.43.1 until this is sorted out :)

Reported by andrew.herron@ephox.com on 2014-11-05 06:26:09

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member

Reported by barancev on 2014-11-05 07:49:44

  • Status changed: Accepted
Member

lukeis commented Mar 4, 2016

Reported by barancev on 2014-11-05 07:49:44

  • Status changed: Accepted
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Closed by revision b0e0e343c5a7

Reported by barancev on 2014-11-05 18:12:27

  • Status changed: Fixed
Member

lukeis commented Mar 4, 2016

Closed by revision b0e0e343c5a7

Reported by barancev on 2014-11-05 18:12:27

  • Status changed: Fixed
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Thanks for that!

Reported by andrew.herron@ephox.com on 2014-11-06 07:10:27

Member

lukeis commented Mar 4, 2016

Thanks for that!

Reported by andrew.herron@ephox.com on 2014-11-06 07:10:27

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Issue 8171 has been merged into this issue.

Reported by barancev on 2014-11-17 06:23:08

Member

lukeis commented Mar 4, 2016

Issue 8171 has been merged into this issue.

Reported by barancev on 2014-11-17 06:23:08

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Interestingly this issue does not occur in the .net port of 2.44.0...must
be implemented differently...

Reported by andrew.paul.gray on 2014-11-20 07:30:19

Member

lukeis commented Mar 4, 2016

Interestingly this issue does not occur in the .net port of 2.44.0...must
be implemented differently...

Reported by andrew.paul.gray on 2014-11-20 07:30:19

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Just wondering if the release of 2.45 is far away?

Reported by threesixtydegreesolutions on 2014-12-01 01:25:45

Member

lukeis commented Mar 4, 2016

Just wondering if the release of 2.45 is far away?

Reported by threesixtydegreesolutions on 2014-12-01 01:25:45

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Issue 8467 has been merged into this issue.

Reported by barancev on 2015-02-13 05:40:25

Member

lukeis commented Mar 4, 2016

Issue 8467 has been merged into this issue.

Reported by barancev on 2015-02-13 05:40:25

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
When is selenium 2.45 to be released?

Reported by andrew.paul.gray on 2015-02-13 06:15:15

Member

lukeis commented Mar 4, 2016

When is selenium 2.45 to be released?

Reported by andrew.paul.gray on 2015-02-13 06:15:15

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member

Reported by luke.semerau on 2015-09-17 18:24:44

  • Labels added: Restrict-AddIssueComment-Commit
Member

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:24:44

  • Labels added: Restrict-AddIssueComment-Commit

@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.