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

Multiple clicks on a Button Before the next page is loaded

3 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nate
Top achievements
Rank 1
Nate asked on 13 May 2011, 09:27 PM
Hello,
        Is there a way I can simulate a user clicking a button several times before the next (resulting) page is loaded? I know in most cases this doesn't make sense, however I'm trying to test a particular issue where a user clicks a button that will cause multiple requests to the server. I'm looking for a setting that this may affect, and i've tried setting the timeout to a very short time and this doesn't seem to be helping.

3 Answers, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 17 May 2011, 07:39 AM
Hello Nate,

Thank you for writing.

If you want to click a button that does not refresh the page you can record the step that click the button and wrap it a loop step. You can find how to create a loop step and set its count in the guide here.

So drag the click step and drop it in the loop. If you execute the test this button will be clicked count times. But if you want to click a submit button this test will probably fail.

For further questions, do not hesitate to contact us.

Best wishes,
Dobry Zranchev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Nate
Top achievements
Rank 1
answered on 17 May 2011, 08:07 PM
"But if you want to click a submit button this test will probably fail."

Yes, that fails and that's the situation I'm in.

I have tried adjusting the "WaitOnElements" property to False however that doesn't appear to help. How can I have it click the submit button multiple times without the framework waiting for the next page to load?
0
Dobry Zranchev
Telerik team
answered on 18 May 2011, 03:07 PM
Hi Nate,

You can try to do it as you follow the steps bellow:
1. Create a step that click the button.
2. Select the step in the list and set properties:
  • SimulateRealClick = true
  • WaitOnElements = false
  • WaitOnElementsTimeout = 0
3. Copy and paste this step more then twice.

This solution will give you ability to click the button more then one before the page is reloaded.

For further assistance, do not hesitate to contact us.

Greetings,
Dobry Zranchev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Nate
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Nate
Top achievements
Rank 1
Share this question
or