Questions tagged [mutablecapabilities]

MutableCapabilities is a Class from org.openqa.selenium The Implemented Interfaces are : java.io.Serializable and Capabilities The Direct Known Subclasses are : ChromeOptions, DesiredCapabilities, EdgeOptions, FirefoxOptions, InternetExplorerOptions, OperaOptions, SafariOptions

Constructor Summary

  • Constructors

    MutableCapabilities()
    MutableCapabilities(Capabilities other) 
    MutableCapabilities(java.util.Map<java.lang.String,?> capabilities) 
    

Method Summary

  • Methods

    Modifier and Type                                 Method and Description
    -----------------                                 ----------------------
    protected int                           amendHashCode()
                                            [Subclasses can use this to add information that isn't always in the capabilities map.]
    java.util.Map<java.lang.String,java.lang.Object>    asMap() 
    boolean                                 equals(java.lang.Object o) 
    java.lang.Object                        getCapability(java.lang.String capabilityName) 
    Platform                                getPlatform() 
    int                                     hashCode() 
    MutableCapabilities                     merge(Capabilities extraCapabilities)
                                            [Merges the extra capabilities provided into this DesiredCapabilities instance.]
    void                                    setCapability(java.lang.String capabilityName, boolean value) 
    void                                    setCapability(java.lang.String key, java.lang.Object value) 
    void                                    setCapability(java.lang.String capabilityName, Platform value) 
    void                                    setCapability(java.lang.String capabilityName, java.lang.String value) 
    java.lang.String                        toString() 
    
16 questions
3
votes
1 answer

org.openqa.selenium.InvalidArgumentException: Invalid capabilities using DesiredCapabilities

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…
1
vote
2 answers

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

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",…
1
vote
1 answer

Common options object for all browser option classes in Selenium

I was earlier using DesiredCapabilities class to create a generic method for setting all capabilities of the browser, using an external file(key=value format). Here's my code public DesiredCapabilities setWebDriverCapabilities(String browser) throws…
1
vote
1 answer

How to ignore protected Mode Settings for Internet Explorer using setCapability() through Selenium and Java?

I am trying to test in java selenium with IE but my problem is I have to keep on configuring the settings in protected Mode, is the an alternative to the deprecated function WebDriver driver = new InternetExplorerDriver(cap); As I would like to…
1
vote
1 answer

How to address "The constructor ChromeDriver(Capabilities) is deprecated" and WebDriverException: Timed out error with ChromeDriver and Chrome

I'm trying to config the default download directory as below, it's works correctly but I'm having two issues : String exePath = "src\\Drivers\\chromedriver.exe"; System.setProperty("webdriver.chrome.driver", exePath); String…
1
vote
1 answer

How to Merge Chrome driver service with desired capabilities for headless using xvfb?

I want to merge ChromeDriverService with chromeOptions or with DesiredCapabilities for running browser in xvfb. Below is part of code ChromeDriverService I previously used without selenium grid. String NodeChromeIncognito =…
0
votes
1 answer

Set browserName with protractor test suit name

I am trying to set the browser name with protractor test suite name. Because I am using allure reporter for test report. But the problem is I am getting browser name 'undefined' all the time. So far I have implemented browser name in an asynchronous…
0
votes
1 answer

Unable to create new remote session. desired capabilities = Capabilities [{ie.ensureCleanSession=true}], required capabilities while launching IE

I have updated IE Driver to 3.12.0.0 and it is not working. I get the below error message Code: DesiredCapabilities cap = new DesiredCapabilities(); cap.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION,…
0
votes
2 answers

org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities while trying to launch Firefox with Selenium v3.8.1

I am not able to launch Firefox browser using geckodriver in Selenium 3.8.1 This is my code public class LoginTest { @SuppressWarnings("deprecation") @Test public static void logintest() { …
Ab123
  • 395
  • 1
  • 10
  • 31
0
votes
3 answers

Automatically download files using selenium Chromedriver 3.11.0 on a Mac

I've read through a bunch of selenium topics on here and I've been going in circles on how the permissions / options should be set for the chromedriver. I've made the following code: System.setProperty("webdriver.chrome.driver",…
0
votes
2 answers

How to add DesiredCapabilities to GeckoDriver in Selenium-Java 3.11

Am trying to use GeckoDriver for firefox in selenium-java 3.11. The firefox version is 59. Things are working fine and am able to invoke the firefox driver. The only challenge is I need to add DesiredCapabilities to my firefox instance. The old…
0
votes
1 answer

disable notification for allowing my location using selenium

I am trying to initialize the FirefoxDriver so it can disable the notification of a website for allowing my location. I searched and found this code. But when putting ffprofile on FirefoxDriver() it says cannot resolve…
0
votes
1 answer

org.openqa.selenium.MutableCapabilities not available?

I don't seem to have org.openqa.selenium.MutableCapabilities available in my version of Selenium. I'm using version 2.53.0. I'm trying to use Selenium standalone server in a Grails project and the application is crashing on this line: ChromeOptions…
Sulteric
  • 365
  • 2
  • 14
0
votes
4 answers

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

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…
-1
votes
1 answer

java.lang.NoSuchMethodError: org.openqa.selenium.firefox.FirefoxOptions.merge(Capabilities) when trying to merge DesiredCapabilities using Selenium

When I try launching new Selenium/Firefox instance with DesiredCapabilities and FirfoxOptions I get the following code: Exception in thread "main" java.lang.NoSuchMethodError:…
1
2