Forum Discussion

han's avatar
han
Contributor
13 years ago

Supported ObjectType?

Is "all" object types supported?



Can't find <li> elements in object browser or with findall/findallchildren.

Our html structure has <li> elements that contains the unique identifier I want to use to click the link object that lies beneath the <li> element

1 Reply

  • Hi,



    Our html structure has <li> elements that contains the unique identifier I want to use to click the link object that lies beneath the <li> element



    I suggest you the following approach to implement your scenario:


    1. Retrieve all links from the page (links = Page.FindAllChildren("tagName", "A", "100")).


    2. Iterate through the elements of the "links" array: for each element, retrieve the value of the "id" attribute by parsing the value returned by the "outerHTML" property of the element.


    3. Check whether this is the needed "id". If it is, click the element and exit the loop.


    This approach will work for all web tree models.






    Can't find <li> elements in object browser



    I assume, you're using the Tree web tree model. You do not see these elements, and this is expected. You can find the list of elements that are supported by the model in the Object Types Used by the Tree Model help topic. As for the other web tree models, the elements will look like Item("identifier") or Item("name").