Skip to content
This repository was archived by the owner on Dec 26, 2019. It is now read-only.
This repository was archived by the owner on Dec 26, 2019. It is now read-only.

issue with finding a long accessibility id element #1127

@StepzGigz

Description

@StepzGigz

I am testing a mobile application, and haven't had any issues mapping out and identifying all of the accessibility id's so far within the application but I am stuck on not being able to identify one case in particular...

I have a case where one of the accessibility id is very long in the form of "The password must have between 8 and 16 characters. It must contain at least 1 number, 1 letter, and 1 non-alphanumeric characters". When I specify this accessibility in my code, I keep getting consistent errors that the element can't be found. Is there a workaround for this, to maybe shorten this or any other solution?

I've tried searching around for this solution, but haven't been able to find anything and have been stuck on this the past day. Please help :)

String actual_error= driver.findElementByAccessibilityId("The password must have between 8 and 16 characters. It must contain at least 1 number, 1 letter, and 1 non-alphanumeric character").getText();
String expected_error= "The password must have between 8 and 16 characters. It must contain at least 1 number, 1 letter, and 1 non-alphanumeric character";
Assert.assertEquals(actual_error, expected_error);

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