Scenario 1:
In web page i have 10 check boxes, irrespective of their names i want to select 4th checkbox
(in QTP we can do using index method, webcheckbox("index:=3").checked = True)
Scenario 2:
wanted to check all the checkboxes in the page (irrespective of their names and count)
Any help plz
Thanks in advance
Thanks,
Chandra
5 Answers, 1 is accepted
Thank you for contacting us.
The fastest and easiest way is to insert all check boxes into a list and then check some of them or all of them (the second scenario) via a coded step.
IList<HtmlInputCheckBox> list = ActiveBrowser.Find.AllByAttributes<HtmlInputCheckBox>(
"type = checkbox"
);
//First scenario
list[3].Check(
true
,
true
);
//Second scenario
foreach
(HtmlInputCheckBox item
in
list)
{
item.Check(
true
,
true
);
}
I recorded a short video as a demonstration.
Let me know if you need further assistance. Regards,
Boyan Boev
Telerik
Reserve your seat today!
Thanks for the quick reply
Error was observed during the run, Please find below
InnerException:
ArtOfTest.WebAii.Exceptions.FindException: Find Details:- FindParam used: [Find logic: Use 'AttributesOnly' where (type = checkbox) ]- Start Element: null
Analysis:
the reaseon for the failure is, check boxes are availble in the separate window rather than the parent browser window.
How to proceed further now, I tried to resolve but errors were shown
/* Window sWindow = WindowManager.FindWindowRecursively((IntPtr.Zero, "&Set Active List", false, 0);
IList<HtmlInputCheckBox> list = sWindow.AllChildren<HtmlInputCheckBox>("type = checkbox");
Thanks,
Chandra
You need just to locate the check boxes in the new widows. Did Test Studio connect to it?
In order to assist you best please:
1. Please send us the execution log.
2. Can you please record a Jing video demonstrating the issue?
3. If you continue to have difficulty, we'll need to reproduce the issue locally in order to investigate what is happening and find a workable solution for you. Please provide us with a copy of your test and access to your application. If it is not possible to grant us access to your application, please take a Fiddler trace using FiddlerCap and send it to us in a zip file.
Hope to hear from you soon.
Boyan Boev
Telerik
Reserve your seat today!
Facing lot of issues with Telerik object identification
Thats all I can say
Please provide us the detailed information as I asked you in the previous response and we will do our best to help you out with all problems you are experiencing.
Hope to hear from you soon.
Boyan Boev
Telerik
Reserve your seat today!