Forum Discussion

DEEGOON's avatar
DEEGOON
New Contributor
8 years ago

I need to click on an object that can exist multiple times on a web page.

Hello , I am working with keyword testing. I have a test that will open a page and process a change (This is working). I am having trouble clicking a icon if it exists. The tricky thing is that the object I need to click will appear in different amounts. For example, on one page the same object will appear 2 times and I need to click it then when I open another page the object could appear 3 times and I need to click it three times. I need to figure out how to make it dynamic so that TC knows how many times to click the object before proceeding to the next page to do its work. Any help is greatly appreciated.

 

1 Reply

  • NisHera's avatar
    NisHera
    Valued Contributor

    you can use FindAllChildren from the parent object to get all

    Similar

    objects.
    you may use common property and value for all the objects you are looking for.


    once you have array of objects can operate click on each using index of array.


    I'm not sure how far that could be achieved in keyword test...I'm doing only scripting
    if not possible just write a small script and call it from keyword.
    you can take idea and modify code shown here