File tree 1 file changed +11
-0
lines changed
java/client/test/org/openqa/selenium/remote
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
22
import org .junit .runner .RunWith ;
23
23
import org .junit .runners .JUnit4 ;
24
24
import org .openqa .selenium .Capabilities ;
25
+ import org .openqa .selenium .Platform ;
25
26
import org .openqa .selenium .StubDriver ;
26
27
import org .openqa .selenium .WebDriver ;
27
28
import org .openqa .selenium .logging .LoggingPreferences ;
@@ -93,4 +94,14 @@ public void testExtractDebugLogLevelFromCapabilityMap() {
93
94
(LoggingPreferences ) caps .getCapability (CapabilityType .LOGGING_PREFS );
94
95
assertSame (Level .FINE , prefs .getLevel ("browser" ));
95
96
}
97
+
98
+ @ Test
99
+ public void shouldAutomaticallyConvertPlatformFromStringToEnum () {
100
+ DesiredCapabilities caps = new DesiredCapabilities ();
101
+ caps .setCapability (CapabilityType .PLATFORM , "windows 7" );
102
+ assertEquals (caps .getCapability (CapabilityType .PLATFORM ), Platform .VISTA );
103
+ caps .setCapability (CapabilityType .PLATFORM , "WIN8_1" );
104
+ assertEquals (caps .getCapability (CapabilityType .PLATFORM ), Platform .WIN8_1 );
105
+ }
106
+
96
107
}
You can’t perform that action at this time.
0 commit comments