This is a migrated thread and some comments may be shown as answers.

Catch Browser Refresh/Navigation event

2 Answers 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
zafar
Top achievements
Rank 1
zafar asked on 30 Jan 2016, 09:56 AM
I am  using test Framework to automate certain web tasks.I am using ArtOfTest.WebAii.Core.dll to autofilll the web forms. There are also certain user interactions on the web browser, which was launched and managed by the test framework. I basically am looking for the way to catch the event in the .NET applciation when user explicitly clicks an element in the browser web page or explicitly navigates to the new web address by typing on the address bar in the web browser.Though I am able to refresh the DOM tree by invoking myManager.ActiveBrowser.RefreshDomTree(); I am looking for the event so that I can do my processing only when it is required, instead of tracking it repeatedly. Thanks

2 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 04 Feb 2016, 07:33 AM
Hello Zafar,

Unfortunately this is not possible using the Testing framework. In Test Studio there are some steps that are doing this and this is embedded in the step, such as wait for exist for an element refreshes the browser, the click step waits for the browser to return ready state etc.

Thank you for your understanding.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
jwize
Top achievements
Rank 1
answered on 21 Apr 2016, 10:49 PM

What if I have a javascript that needs to be loaded at the navigate time? I shouldn't have to added a test step at the beginning for every test to get this to happen. I should be able to plug in to the page loaded event and do it everywhere with a single line of code. 

Why not, this is the most important part of the test life-cycle. Telerik's code must wait for the page load to run the test code why not create an event that the user can subscribe to so they can load test-specific JavaScripts into the page or do some pre-test configuration at that time. 

This is a very unnecessary and short-sighted limitation to the framework IMO.

 

PS.  Also, the fact that you can't navigate Test Studio without a mouse is sad. How do I get to the code window with the keyboard, "tell me that."?

Tags
General Discussions
Asked by
zafar
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
jwize
Top achievements
Rank 1
Share this question
or