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

step of clicking button in pop up window failing

8 Answers 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vaishali
Top achievements
Rank 1
Vaishali asked on 03 Dec 2013, 09:29 PM
Hi Telerik Team,

I have the following issue when playing back my script.

 I open a pop up window from my parent window and  select some options from a drop down and click a button on the pop up window which close the pop up window. I cannot playback the step as it fails. I have a couple of steps like this in my test and all of them fail.

If I instruct my test to stop running just before the step where I have to open a pop up window and then continue to run my test from the next step the playback works.

Do I have to give a delay ? Please help.

Regards,

Vaishali


8 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 2
answered on 04 Dec 2013, 02:33 PM
Can you post a screenshot of steps or coded steps, along with some screen shots of the scenario?

How long does the popup take to be ready?  You may need to increase the connect time from 5 seconds to something higher.
0
Vaishali
Top achievements
Rank 1
answered on 04 Dec 2013, 04:01 PM
Hello,

I have attached the screen shot of steps and scenarios. The steps described pass sometimes and sometimes fail. The popupwaittimeout is around 5 sec. I also tried increasing this but didnt help.

Regards,

Vaishali
0
Daniel
Top achievements
Rank 2
answered on 04 Dec 2013, 04:07 PM
*EDIT*
The below post was because I didn't read the original reply well enough.  Only use the below if you need to.  My next post offers an actual suggestion to help alleviate the problem you are facing.

------------------
Is it failing on the step right after the window closes?  What is the error message?

It doesn't look like you are accounting for the popups closing, which I realize can be tricky.  To deal with this myself (on popups that take various amounts of time to close, or are just stubborn), I created a coded step that waits for the browser window count to be 1 before continuing.
[CodedStep(@"Wait for popup to close.")]
public void WaitForClose()
{
    while (Manager.Browsers.Count == 2)
    {
        System.Threading.Thread.Sleep(2000);
    }
}

Just as a suggestion, try that as an added step after each time the popup should close and see if it helps.

0
Daniel
Top achievements
Rank 2
answered on 04 Dec 2013, 04:09 PM
Also, are the URL's you are connecting to dynamic?  As in, will the URL change depending on what is clicked?

You can edit the properties of that step and set the URL to partial, then shorten your URL to for instance "/papa11/transactions/Guarantees_SelecCreditLink.jsp?" (Step 18) instead of the entire URL.  Now Test Studio will connect to any popup that has that partial URL for the next step.
0
Vaishali
Top achievements
Rank 1
answered on 04 Dec 2013, 04:34 PM
Thanks. I will check this later and find out if works. I have another important task that I have to look into currently.

Regards,

Vaishali
0
Mary
Top achievements
Rank 1
answered on 13 Jan 2014, 03:04 AM
Hi Daniel,

I am having the same problem with Browse pop-up window.
I would like to navigate through files and select a file then  click "Open".

Is there a way to click anything on the pop-up window without entering code step

Thanks,

0
Daniel
Top achievements
Rank 2
answered on 13 Jan 2014, 03:50 PM
Could you elaborate a bit please?  I'm not quite following what you are looking for.  Any screenshots of the steps would be appreciated.
0
Boyan Boev
Telerik team
answered on 15 Jan 2014, 03:26 PM
Hi Maria,

Thank you for contacting us.

As Daniel said please elaborate a bit more on your scenario. What exactly do you want to achieve?

A jing video or a screen shot will be helpful.

Here is an article about handling pop ups.

Hope this helps.

Regards,
Boyan Boev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Vaishali
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 2
Vaishali
Top achievements
Rank 1
Mary
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or