Skip to content

locating elements by AutomationId #360

@bistritapcv

Description

@bistritapcv

I have a form (see picture 1) with a text box I have highlighted. I ran inspect.exe on it (see picture 2). I am using winium but when I do a
driver.findElement(By.xpath("//*[@AutomationId = 'ACCT-004-CFLDpubRequestOutputName']")); it does not find anything.

I can locate this element by trial and error doing a brute force find and doing a clear() and see if it clears the box. I found the element and did a getAttribute() on "LocalizedControlType" which returned "edit". But when I do a getAttribute("AutomationId") it returns null. The same happens for all the elements I try this on with non-null AutomationIds yet they are all null.

I can find things other ways, for instance a check box, but more than 1 checkbox is found and I have to just give an index (like eles.get(2)) which can always change. There also could be other text entry boxes besides the one above so I do not like using vague search criteria.
graph
insp1

Has anyone else reported AutomationId not working with Winium?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions