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

click method not working

3 Answers 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pam
Top achievements
Rank 1
Pam asked on 29 Sep 2011, 04:47 PM
I have a test that finds the control and clicks it to reset a filter section to default settings.
I've run this test in our pre-production environment and it works fine. When I run this in our production environment (currently the UI code is identical) it finds the control, but the click doesn't work. Nor does it error. Just seems to ignore it and continue to the assert which then fails.

the code is simple
HtmlControl filterReset = new HtmlControl(Find.ByAttributes("id=FilterActionBarReset"));
filterReset.Click();


it is used to find this element
<div class="rightAction" id="FilterActionBarReset" jQuery15206472203044463981="175">

I'm most confused by the fact that this runs in both our pre-prod (identical code) and our dev environments, but fails to click in the prod.

any ideas why this would happen?

3 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 30 Sep 2011, 01:12 PM
Hi Pam,
     it's hard to say what the problem is without the ability to run the test and see it in action.

Sometime the generic click associated with the HtmlControl type isn't invoked correctly. It's possible that this is the issue. Try modifing your code like this and check out whether it makes any difference:
HtmlControl filterReset = new HtmlControl(Find.ByAttributes("id=FilterActionBarReset"));
filterReset.MouseClick();

Alternatively this might be a timing issue. In some applications certain controls are unavailable while waiting for a Postback to complete. Usually the "unavailability" is visually represented by the control being grayed out or something along those lines. While a real user will be able to tell that the control is unavailable Test Studio is still able to locate the element. Attempting to invoke a click on such element will actually return "PASSED" but nothing will actually happen. Check out your app and try to determine whether this might be the issue.

If you could provide direct access to your app we could analyze the issue for you. You send it in a private email since this is a public forum.   

Best wishes,
Stoich
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pam
Top achievements
Rank 1
answered on 18 Oct 2011, 09:32 PM
Sorry for so late a response.
thank you for the idea, though I did try that as well and was still failing.
not really sure what happened. For now it is working, even though I have no idea what changed.
0
Stoich
Telerik team
answered on 19 Oct 2011, 02:04 PM
Hello Pam,
    perhaps you're dealing with a timing issue. If you continue to experience the same issue consider providing us with access to your app. We'll reproduce the issue locally and analyze it.

Since this is a public forum I can provide a private email in which you can give me the necessary data.

Regards,
Stoich
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Pam
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Pam
Top achievements
Rank 1
Share this question
or