You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of appium, some of the CollectionCondition we have might not work.
For example, shouldHave(exactTexts(String... strings)
In case of android, the attribute can be text or content-desc but in case of ios it can be label or name attribute. So the test will fail as it cannot fetch text attribute.
In my work, I have created my own custom condition. But I think if we add this in SelenideAppium it might help everyone.
amuthansakthivel
changed the title
Add custom collection condition for validation
Add custom condition and collection condition for validation
Dec 31, 2022
@amuthansakthivel I started thinking on your suggestion. In the essence, it's very useful, we definitely need to make collection conditions work with Appium.
But I think we don't really need to re-implement conditions. Instead, we should only make function "get element text" overridable (injected via plugin system). Then we could override this function in selenide-appium, and all Selenide built-in conditions can still be reused.
@asolntsev - Seems like a more reliable solution with fewer efforts. Could you please provide few pointers where I could get some example to implement this
The problem
In case of appium, some of the CollectionCondition we have might not work.
For example, shouldHave(exactTexts(String... strings)
In case of android, the attribute can be text or content-desc but in case of ios it can be label or name attribute. So the test will fail as it cannot fetch text attribute.
In my work, I have created my own custom condition. But I think if we add this in SelenideAppium it might help everyone.
Usage:
or using lambdas:
This is my custom implementation to give some idea
The text was updated successfully, but these errors were encountered: