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

[Solved] Problem with selecting checkboxes

3 Answers 80 Views
Automation Design Canvas
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Charles W
Top achievements
Rank 1
Charles W asked on 17 Nov 2009, 01:38 PM
Hi ,
 
    this is charles ...

i had a problem while trying to automate an application .

Scenario :

* Consider v have 10 items with the check boxes (ch1 to ch 10).
* If i check the first checkbox (eg:ch1) and delete the item , then the second checkbox (ch2)is coming to that ch1's position.
* In our application they haven't given any ids for the checkboxes, its simply recognizing as checkox .

How can i automate the scenario ??
How can i use the Design canvas for this scenario ??

i have attached sample screenshot also.
plz help me to solve this problem.

Thank & Regards,
Charles

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 17 Nov 2009, 03:44 PM
Hi Charles,

So was the check box selection and deletion recorded correctly? If so, after the deletion test step, please try entering this coded step:

[CodedStep("Refresh After Deletion")]
public void MyCustomStep()
{
    // Custom code goes here
    ActiveBrowser.RefreshDomTree();
}

After this step, the you can try another checkbox selection, deletion, or any other scenario you wanted on the check boxes.

If the check box selection and/or deletion isn't working on test execution and playback, or the above coded step isn't working on test execution and playback either, please let us know.

Best wishes,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Vara
Top achievements
Rank 1
answered on 17 Nov 2009, 06:30 PM

Hi Nelson,
Thanks for your quick response. I work along with Charles.
The Checkbox selection and Deletion recorded correctly and the test passed (Playback).

I have a question, Please follow the steps and refer the screenshot attached by Charles: 
  -  I recorded my script by selecting the checkbox which belongs to "123" and deleted. Now "ABC Org" will take that place.

  -  I manually added one more Org, "ABC Organization". 
  -  If I run my delete script it will delete "ABC Org" (which is in position of "123").
I want to delete the newly created organization. So how the tool will recognize the checkbox related to my newly created organization.

 

In application they are no id's to the checkboxes. So please suggest how to go about this issue.

Regards,
Vara 

0
Missing User
answered on 17 Nov 2009, 07:40 PM
Hi Vara,

The code I posted should update the DOM after the deletion of the selected checkbox item.  You can also do this custom code after adding an item to get the latest DOM to record over.

So it looks like the scenario would be:

1) Select and delete checkbox/row
2) RefreshDom() to get the new positioning
3) Have WebUI automate adding a new checkbox/row
4) RefreshDom() to get the new positioning
5) Select and delete newly added checkbox/row

It seems like this would work as long as WebUI is able to record over an updated DOM and successfully enter a new checkbox/row.

If WebUI is not able to find  the new check box to delete after trying the above, please view this video on changing find params. If the checkbox/row is assigned random or no attributes, you can try changing the find params to something that would true during playback (xpath, tag index, or text content etc). 

All the best,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Automation Design Canvas
Asked by
Charles W
Top achievements
Rank 1
Answers by
Missing User
Vara
Top achievements
Rank 1
Share this question
or