desiredcapabilities

Protractor W3C capability

浪尽此生 提交于 2021-01-29 10:50:19
问题 I am using Protractor with Selenoid . I need to use the dockerized Windows images so that I can test Internet Explorer and Edge from Linux boxes. I was able to make it work from curl by running: curl -X POST http://127.0.0.1:4444/wd/hub/session -d '{"capabilities":{"browserName":"MicrosoftEdge","count":1,"alwaysMatch":{"browserName":"MicrosoftEdge","selenoid:options":{"enableVNC":true,"enableVideo":false,"enableLog":true,"logName":"edge-18.0.log"}}}}' My protractor config looks like:

How to pass the capabilities and options into Firefoxdriver using Selenium through Java

亡梦爱人 提交于 2020-01-05 03:46:31
问题 I have this: System.setProperty("webdriver.gecko.driver", "gecko/linux/geckodriver"); FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("network.proxy.no_proxies_on", "localhost"); profile.setPreference("javascript.enabled", true); DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("marionette", true); capabilities.setCapability(FirefoxDriver.PROFILE, profile); FirefoxOptions options = new FirefoxOptions(); options.setLogLevel(Level

Invalid capabilities in alwaysMatch: unhandledPromptBehavior is type boolean instead of string

爱⌒轻易说出口 提交于 2019-12-11 15:46:02
问题 I have upgraded my Selenium framework to the latest version. During execution of the code, I receive the following exception Exception : org.openqa.selenium.InvalidArgumentException: Invalid capabilities in alwaysMatch: unhandledPromptBehavior is type boolean instead of string Details : Selenium: 3.7.1 IE : 3.7.0 (32 Bit Driver) java.version: '1.8.0_144' Automation code works with my older IE Driver (32 Bit) - 3.4.0. Please suggest your view to resolve the error . capabilities.setCapability(

DesiredCapabilities is obsolete

為{幸葍}努か 提交于 2019-12-07 17:02:22
问题 I used to have the following code in order to run the driver as different user. public static IWebDriver RunIEAsDifferentUser(string User,string Password) { var capabilitiesInternet = DesiredCapabilities.InternetExplorer(); capabilitiesInternet.SetCapability("ignoreProtectedModeSettings", true); capabilitiesInternet.SetCapability("EnsureCleanSession ", true); RunAs("C:\\Exlporer/IEDriverServer.exe", User, Password); _webdriverIE = new RemoteWebDriver(new Uri("http://localhost:5555/"),

DesiredCapabilities is obsolete

帅比萌擦擦* 提交于 2019-12-05 18:38:41
I used to have the following code in order to run the driver as different user. public static IWebDriver RunIEAsDifferentUser(string User,string Password) { var capabilitiesInternet = DesiredCapabilities.InternetExplorer(); capabilitiesInternet.SetCapability("ignoreProtectedModeSettings", true); capabilitiesInternet.SetCapability("EnsureCleanSession ", true); RunAs("C:\\Exlporer/IEDriverServer.exe", User, Password); _webdriverIE = new RemoteWebDriver(new Uri("http://localhost:5555/"), capabilitiesInternet, TimeSpan.FromSeconds(300)); return _webdriverIE; } public static void RunAs(string path,

How to provide custom capabilities on the selenium server?

感情迁移 提交于 2019-12-02 16:18:03
问题 I know that some selenium capabilities can be obtained with a method, one of them like this : driver.getCapabilities().getBrowserName(); It returns the value of the browser name. But if it refers to an available method, if I don't misunderstand it, this seems to be related to custom capabilities, like this I mean : driver.getCapabilities().getCapability("something ?"); Returns: The value, or null if not set. So, I've tried to make a simple code to get the value I mean. private RemoteWebDriver

How to provide custom capabilities on the selenium server?

↘锁芯ラ 提交于 2019-12-02 09:50:49
I know that some selenium capabilities can be obtained with a method, one of them like this : driver.getCapabilities().getBrowserName(); It returns the value of the browser name. But if it refers to an available method, if I don't misunderstand it, this seems to be related to custom capabilities, like this I mean : driver.getCapabilities().getCapability("something ?"); Returns: The value, or null if not set. So, I've tried to make a simple code to get the value I mean. private RemoteWebDriver driver; private URL url; private DesiredCapabilities dc = new DesiredCapabilities(); @Before public

ChromeDriver(Capabilities capabilities) is deprecated

纵然是瞬间 提交于 2019-11-29 00:11:38
I use ChromeDriver 2.33 with WebDriver 3.6.0 and try to set default directory for file download. Map<String, Object> prefs = new HashMap<String, Object>(); prefs.put("download.default_directory", Vars.DOWNLOAD_FOLDER_ROOT); DesiredCapabilities caps = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); options.addArguments("--start-maximized"); options.setExperimentalOption("prefs", prefs); caps.setCapability(ChromeOptions.CAPABILITY, options); driver = new ChromeDriver(caps); I found this in docs: Use ChromeDriver(ChromeOptions) instead. Creates a new ChromeDriver

Selenium not detecting the second window in IE

浪尽此生 提交于 2019-11-28 12:14:44
My application opens up a new window on clicking a button and i need to perform some actions in that window. But the response getWindowHandles() method of selenium webdriver has only one window id in it. This happens especially if there is a delay in calling the getWindowHandles() after opening the new window. There is a known issue with selenium. https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration But even the solution for that is not working for me. Code is as follows DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();

Selenium InternetExplorerDriver doesn't get focus on the window

风格不统一 提交于 2019-11-27 09:52:08
My project includes Selenium webdriver, JAVA, Maven, TestNG, Jenkins, Allure (reports). I have a few suites of tests with 100+ test cases, and I iterate them through 3 different browsers (the tests run in parallel using TestNG). There is one test that can't pass unless I am actually watching the window and see the test run. I will explain: what am I trying to test? our JS developers created a feature that only if the user has focus on the window, then a image slideshow will start to move and change images. On Firefox and Chrome it pass great- I don't need to see the test. The focus can be on