-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java] Removing usage of deprecated caps in DesiredCapabilities
- Loading branch information
Showing
2 changed files
with
34 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,16 +25,16 @@ | |
|
||
import static org.openqa.selenium.remote.CapabilityType.ACCEPT_INSECURE_CERTS; | ||
import static org.openqa.selenium.remote.CapabilityType.BROWSER_NAME; | ||
import static org.openqa.selenium.remote.CapabilityType.PLATFORM; | ||
import static org.openqa.selenium.remote.CapabilityType.BROWSER_VERSION; | ||
import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME; | ||
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT; | ||
import static org.openqa.selenium.remote.CapabilityType.VERSION; | ||
|
||
public class DesiredCapabilities extends MutableCapabilities { | ||
|
||
public DesiredCapabilities(String browser, String version, Platform platform) { | ||
setCapability(BROWSER_NAME, browser); | ||
setCapability(VERSION, version); | ||
setCapability(PLATFORM, platform); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
titusfortner
Member
|
||
setCapability(BROWSER_VERSION, version); | ||
setCapability(PLATFORM_NAME, platform); | ||
} | ||
|
||
public DesiredCapabilities() { | ||
|
@@ -64,11 +64,11 @@ public void setBrowserName(String browserName) { | |
} | ||
|
||
public void setVersion(String version) { | ||
setCapability(VERSION, version); | ||
setCapability(BROWSER_VERSION, version); | ||
} | ||
|
||
public void setPlatform(Platform platform) { | ||
setCapability(PLATFORM, platform); | ||
setCapability(PLATFORM_NAME, platform); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Does selenium not do semantic versioning? This is a breaking change in a bugfix release. Just spent two hours trying to work out why on earth going from 4.2.0 to 4.2.1 breaks our tests.