Class DesiredCapabilities

public class DesiredCapabilities extends java.lang.Object implements java.io.Serializable, Capabilities.

 Constructor Summary:

public DesiredCapabilities()
public DesiredCapabilities(Capabilities... others)
public DesiredCapabilities(Capabilities other)
public DesiredCapabilities(java.util.Map<java.lang.String,?> rawMap)
public DesiredCapabilities(java.lang.String browser,
                           java.lang.String version,
                           Platform platform)
Method:

public void setPlatform(Platform platform)

    A key specifying which platform the browser should be running on. This value should be one of
    {WINDOWSXPVISTAMACLINUXUNIXANDROID}. When requesting a new session, the client may
    specify ANY to indicate any available platform may be used. For more information see [GridPlatforms]

public void setJavascriptEnabled(boolean javascriptEnabled)
   Whether the session supports executing user supplied JavaScript in the context of the current page (only on HTMLUnitDriver).
public void setCapability(java.lang.String key,
                          java.lang.Object value)

ex: dc.setCapability(ChromeOptions.CAPABILITY, options);

public void setCapability(java.lang.String capabilityName,
                          java.lang.String value)
ex: dc.setCapability("build", "JUnit-Parallel");

 



posted @ 2017-06-06 11:38  留白*  阅读(247)  评论(0编辑  收藏  举报