Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #84 from sbtqa/ie-capabilities
Browse files Browse the repository at this point in the history
#83 IE capabilities
  • Loading branch information
kosteman authored Oct 31, 2017
2 parents af0b009 + 1d1ad1b commit 92b05ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TagWebDriver {
private static final boolean WEBDRIVER_BROWSER_IE_KILL_ON_DISPOSE = Boolean.parseBoolean(Props.get("webdriver.browser.ie.killOnDispose", "false"));
private static final String WEBDRIVER_BROWSER_NAME = Props.get("webdriver.browser.name").toLowerCase().equals("ie")
// Normalize it for ie shorten name (ie)
? BrowserType.IE : Props.get("webdriver.browser.name").toLowerCase();
? BrowserType.IEXPLORE : Props.get("webdriver.browser.name").toLowerCase();
private static final boolean IS_IE = WEBDRIVER_BROWSER_NAME.equals(BrowserType.IE.toLowerCase())
|| WEBDRIVER_BROWSER_NAME.equals(BrowserType.IE_HTA.toLowerCase())
|| WEBDRIVER_BROWSER_NAME.equals(BrowserType.IEXPLORE.toLowerCase());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import ru.sbtqa.tag.pagefactory.PageFactory;
import ru.sbtqa.tag.pagefactory.drivers.TagWebDriver;
import ru.sbtqa.tag.qautils.properties.Props;

Expand Down Expand Up @@ -90,7 +89,12 @@ public DesiredCapabilities parse() {
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
}
} else {
capabilities.setCapability(capability, Props.get(rawCapabilityKey));
if ("true".equals(Props.get(rawCapabilityKey).toLowerCase().trim())
|| "false".equals(Props.get(rawCapabilityKey).toLowerCase().trim())) {
capabilities.setCapability(capability, Boolean.parseBoolean(Props.get(rawCapabilityKey)));
} else {
capabilities.setCapability(capability, Props.get(rawCapabilityKey));
}
}
}
return capabilities;
Expand Down

0 comments on commit 92b05ea

Please sign in to comment.