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

issue with finding a long accessibility id element #1127

Open
StepzGigz opened this issue Jul 11, 2019 · 0 comments
Open

issue with finding a long accessibility id element #1127

StepzGigz opened this issue Jul 11, 2019 · 0 comments

Comments

@StepzGigz
Copy link

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);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant