java - Unable to access DesiredCapabilities methods -
my question : created desiredcapabilities
instance shown in below code :
public class testcommons { desiredcapabilities capabilities = desiredcapabilities.firefox(); capabilities.setcapability("marionette", true); webdriver driver = new firefoxdriver(); public void setup() { driver.navigate().to( "http://toolsqa.wpengine.com/automation-practice-form/"); driver.manage().window().maximize(); driver.manage().timeouts().implicitlywait(20, timeunit.seconds); system.out.println(""); } public void teardown() { driver.close(); } }
when write capabilities. in next line not getting eclipse intellisense options. , if write capabilities.setcapability
, showing error. in code , in setup()
method when write capabilities. options. why not getting eclipse intellisense outside method? attached screenshot.desiredcapabilities instance
this because have write capabilities.setcapability("marionette", true);
inside method, not inside class.
applies method calls void return type.
a place 1 of @before
-annotated methods (like @beforeclass
) or, in cases, may class constructor.
Comments
Post a Comment