Open nishanbasnet opened 1 month ago
It will be initialised the first time you use it.
before initializing I want to use openUrl("www.google.com"), I am getting Undefined default URL for page object LibraryResearchPage error.
I tried with this option as well getDriver().get("www.google.com"); waitABit(5000); Getting this: org.openqa.selenium.InvalidArgumentException: invalid argument
Hi , My understanding is as long as we have serenity.properties file or serenity.conf file , driver should be able to load from that file and get initialized. Not sure what I am doing wrong here. I followed the document as well.
I cannot initialize getDriver() method in the page class where it extends PageObject. MainClass public class LibraryResearchPage extends PageObject {
public void openBrowser() { System.out.println("getDriver" + getDriver() ); } It is printing Uninitialised WebDriverFacade when I print getDriver().
Serenity.properties
Define the default driver
webdriver.driver=phantomjs
Appears at the top of the reports
serenity.project.name = Executive Office of the President webdriver.autodownload = true webdriver.driver = chrome headless.mode = true serenity.full.page.screenshot.strategy=true
Root package for any JUnit acceptance tests
serenity.test.root=net.article.mot.features
serenity.take.screenshots.for.* = FOR_EACH_ACTION
webdriver.timeouts.implicitlywait = 5000 serenity.take.screenshots=AFTER_EACH_STEP
Customise your riequirements hierarchy
serenity.requirement.types=feature, story
Run the tests without calling webdriver - useful to check your JUnit wiring
serenity.dry.run=true
Customise browser size
serenity.browser.height = 1200
serenity.browser.width = 1200
Serenity.conf serenity { take.screenshots = FOR_FAILURES }
headless.mode = true webdriver { driver = chrome capabilities { browserName = "chrome" acceptInsecureCerts = true "goog:chromeOptions" { args = ["remote-allow-origins=*","test-type", "no-sandbox", "ignore-certificate-errors", "--window-size=1000,800", "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking", "disable-dev-shm-usage", "disable-extensions", "disable-web-security", "disable-translate", "disable-logging"] } } }