3 Answers, 1 is accepted
0
Hello Graham,
Cody
the Telerik team
You have two options. Perhaps the easiest is to use the Wait For Url test step feature. You can set the properties for what form of URL you want to verify. The test will fail if the URL of the active browser does not match the specification you give it after the timeout period.
The other option is to use a coded step. You can get the current URL property via:
ActiveBrowser.Url
This returns a simple string for the current URL. Once you have the URL string, you can do sort of parsing and verification you want in code.
Cody
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Robert
Top achievements
Rank 1
answered on 12 Jun 2014, 03:10 PM
I'm trying to verify a URL and I included and Connect to URL and a Wait for URL but they fail. I get this error Wait for condition has timed out. So, how can I verify a URL has loaded correctly? (it's in a new tabbed browser session) I'd really like to be able to verify content in the new window, but it doesn't look like I can do that.
Help...
Rob
Help...
Rob
0
Hello Rob,
Let me interject into this ticket.
This would be possible using a coded step. Here is a sample code that I have used for verifying a pop-up URL but this should work in any case for the active browser:
Hope this helps.
Regards,
Ivaylo
Telerik
Let me interject into this ticket.
This would be possible using a coded step. Here is a sample code that I have used for verifying a pop-up URL but this should work in any case for the active browser:
string
url1 = Manager.ActiveBrowser.Url.ToString();
string
url2 =
"https://www.facebook.com/events/150086588496398"
;
Assert.IsTrue(url1.Equals(url2, StringComparison.OrdinalIgnoreCase));
Hope this helps.
Regards,
Ivaylo
Telerik