Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serenity is using @FindBy annotation for searching an element for native UI after context change from WebView To Native. #703

Closed
jain0nikhil opened this issue Feb 27, 2017 · 1 comment

Comments

@jain0nikhil
Copy link

Scenario:
Same app for three platforms and UI some UI is native to platform or some in web view.

Example:
The login page is created for all three platform (Android,iOS,Web) with a native components.
-> Create a page object in your automation as given below:
@iOSFindBy(id = "CONTINUE AS A GUEST >")
@findby(id="continue_as_guest_btn")
@AndroidFindBy(id = "guest_login")
public WebElement lnkContinueAsGuest;

//Event on element
public void clickContinueAsGuest(){
lnkContinueAsGuest.click();
}

Expected: While running for iOS, Serenity should use platform-specific locator strategy
Result: Serenity is using only @findby locator strategy for finding an element for Android and iOS.

@wakaleo
Copy link
Member

wakaleo commented Feb 28, 2017

That is an interesting requirement, but it isn't supported at this stage.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants