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

ActiveBrowser.Refresh() required after postback redirect

9 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Morten Røgenes
Top achievements
Rank 1
Morten Røgenes asked on 15 Apr 2010, 09:10 AM
Just wanted to add my experience on this subject.
I was testing a button click (by pressing enter on the keyboard) that redirects on the web server.
On my next step I was checking if the ActiveBrowser.Url had actually been updated, which it had not.
An ActiveBrowser.Refresh() updated ActiveBrowser.Url to give the correct url

ActiveBrowser.Manager.Desktop.KeyBoard.KeyPress(ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("Enter"), 150, 1); 
ActiveBrowser.WaitUntilReady(); 
ActiveBrowser.Refresh(); 
Assert.IsTrue(Manager.ActiveBrowser.Url.EndsWith("start.aspx")); 


A refresh did fix my problem, but is there an other way to refresh this without refreshing the page?

9 Answers, 1 is accepted

Sort by
0
Missing User
answered on 15 Apr 2010, 07:33 PM
Hello Morten,

Thanks for the post. I believe I've run into this before and I could not get the redirected URL without a refresh. Which version of the WebAii framework are you using? Is it 2010.1 412?

Best wishes,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Morten Røgenes
Top achievements
Rank 1
answered on 16 Apr 2010, 08:10 AM
My company just bought this tool, but we're waiting for the machine to install it on, so im still on the trial VS plugin.
I'm not sure where I can find what version it is, but I've only had it for 10 days, so probably one of the newest.

*edit*
Installed version 2.0.9.0
0
Konstantin Petkov
Telerik team
answered on 16 Apr 2010, 08:23 AM
Hello Morten,

We have just released a new version Nelson probably asks about. Since you've purchased recently you can get the new one for free. This includes both the Dev and a QA Edition I've blogged about here.

We highly recommend the new version so please give it a go and let us know if you have any questions going forward.

All the best,
Konstantin Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Morten Røgenes
Top achievements
Rank 1
answered on 16 Apr 2010, 08:51 AM
Thank you very much.
I just got a quick question. Am I allowed to install the purchased version on one machine, and when we get our new machine, I uninstall and install on the new machine? Or should I just download the updated trial?
0
Konstantin Petkov
Telerik team
answered on 16 Apr 2010, 08:57 AM
Hi Morten,

Thank you for the question.

Yes, you can install the product temporary then uninstall it when the new machine is ready and install the product there instead. The only limitation is that you cannot have two (or more) machines with activated WebUI Test Studio on both (for just one purchase). You can activate the product on as many machines as purchases you have.

Best wishes,
Konstantin Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Morten Røgenes
Top achievements
Rank 1
answered on 19 Apr 2010, 02:16 PM
I have installed the newest version and it seems that if I use the enter key, Refresh() is needed, but if I use Click(false), the Url is updated automatically.
0
Missing User
answered on 20 Apr 2010, 12:22 AM
Hello again Morten,

Thanks for the update, I'll try to check this out further and see if there is anything else can be done in the current version to resolve this.

Sincerely,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Accepted
Missing User
answered on 22 Apr 2010, 12:02 AM
Hello again Morten,

After speaking with a coworker on this, the URL property is not refreshed since this sequence works by the framework sending an actual Enter keystroke on the page element that has focus. So currently, it's not something the framework can anticipate will cause a redirect.

Click(false) actually works on the Dom itself, so that we can check to see if the Url changes. Can you try an ActiveBrowser.RefreshDomTree(); after the Enter keystroke to see if that refreshes the Url property?

Best wishes,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Morten Røgenes
Top achievements
Rank 1
answered on 22 Apr 2010, 09:48 AM
ActiveBrowser.ContentWindow.SetFocus(); 
Pages.LoginPage.TxtPassword.ScrollToVisible(); 
Pages.LoginPage.TxtPassword.Focus(); 
ActiveBrowser.Manager.Desktop.KeyBoard.KeyPress(ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("Enter"), 150, 1); 
ActiveBrowser.WaitUntilReady(); 
ActiveBrowser.RefreshDomTree();


Refreshing the dom tree updated the url.
Thank you for the good support =)
Tags
General Discussions
Asked by
Morten Røgenes
Top achievements
Rank 1
Answers by
Missing User
Morten Røgenes
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or