Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set URL at run time #230

Open
HGill1 opened this issue Jun 11, 2019 · 3 comments
Open

Set URL at run time #230

HGill1 opened this issue Jun 11, 2019 · 3 comments

Comments

@HGill1
Copy link

HGill1 commented Jun 11, 2019

I am testing four different sites and each site has some random generated URL getting in some API response.

Is it possible to do something like ThucydidesSystemProperty.WEBDRIVER_BASE_URL= myUrl

or created a method like

public void openLoginPage(String url){
ThucydidesSystemProperty.WEBDRIVER_BASE_URL = url;
loginPage.open(fullUrl);
}

@HGill1
Copy link
Author

HGill1 commented Jun 11, 2019

Can't I open URL without setting it in properties file?
Like
driver.get(url)

@wakaleo
Copy link
Member

wakaleo commented Jun 11, 2019

Yes, you can call getDriver().get(url) at any time.

@HGill1
Copy link
Author

HGill1 commented Jun 11, 2019

Thanks Wakaleo, it worked.

Got another issue, control not going to next step after opening the success page.

In my step definition class I am doing

private LoginPage loginPage;
private LoginSuccess loginSuccessPage;

Step 1
loginPage.enterUsername( username );
loginPage.enterPassword( password );
loginPage.clickLoginButton();

And next step is
loginSuccessPage.validateLoginSuccess()
Control is not coming to loginSuccessPage but its opening in browser.
Am I missing something do I need to intialize loginSuccessPage but I have already declared it at top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants