Forum Discussion
sarya
14 years agoFrequent Contributor
Hey Pavel,
Thanks so much for your help .It solved my problem.The code that you give ran perfectly fine.Just I was not able to get some piece of the code where you mentioned the 'For' loop.So if you can explain me that.
Let's take that your icon is on the same level as "demo" +- 5 pixels, then the code will be like this:
all = page.document.frames.ifmfolder.document.all;
a = page.NAtiveWebObject.Find("outerText","demo");
icons = a.parent.FindAll("namePropStr","plus.gif", 1);
icons = VBArray(icons).toArray();
for (var i=0; i<icons.length; i++)
{
if ((icons.Top>a.Top-5)&&(icons.Top<a.Top+5))
{icon = icons; break}
}
icon.Click();
Thanks,
Sumedha
Thanks so much for your help .It solved my problem.The code that you give ran perfectly fine.Just I was not able to get some piece of the code where you mentioned the 'For' loop.So if you can explain me that.
Let's take that your icon is on the same level as "demo" +- 5 pixels, then the code will be like this:
all = page.document.frames.ifmfolder.document.all;
a = page.NAtiveWebObject.Find("outerText","demo");
icons = a.parent.FindAll("namePropStr","plus.gif", 1);
icons = VBArray(icons).toArray();
for (var i=0; i<icons.length; i++)
{
if ((icons.Top>a.Top-5)&&(icons.Top<a.Top+5))
{icon = icons; break}
}
icon.Click();
Thanks,
Sumedha
Related Content
- 12 months agolalit_singh
- 4 years agoTestQA1
Recent Discussions
- 12 hours agoashly