appium: org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:
The problem
1.7.2-beta2 + java client version 5.0.4
- I had an element which was working in earlier version of appium
@AndroidFindBy(xpath="//android.widget.Button[@content-desc='button-lets-begin']")
@iOSFindBy(xpath="//XCUIElementTypeButton[@name='button-lets-begin']")
private WebElement LetsBeginButton;
org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:
- native content: "By.id: LetsBeginButton"
- html content: "by id or name "LetsBeginButton""
at io.appium.java_client.pagefactory.AppiumElementLocator.findElement(AppiumElementLocator.java:102)
at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept(InterceptorOfASingleElement.java:61)
at org.openqa.selenium.remote.RemoteWebElement$$EnhancerByCGLIB$$d27c0df4.click(<generated>)
Environment
- Appium version (or git revision) that exhibits the issue: 1.7.2-beta2
- Last Appium version that did not exhibit the issue (if applicable): 1.7.0
- Desktop OS/version used to run Appium: Mac OS
- Node.js version (unless using Appium.app|exe): v8.4.0
- Mobile platform/version under test: iOS Simulator 11.2
- Real device or emulator/simulator: simulator
- Appium CLI or Appium.app|exe: CLI
Details
If necessary, describe the problem you have been experiencing in more detail.
Link to Appium logs
https://gist.github.com/vikramvi/53556a6fe2cef7e5363c8b75a50d5f8e
Code To Reproduce Issue [ Good To Have ]
NA
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (10 by maintainers)
@TikhomirovSergey can you please look into this issue
Below annotations work well in Appium 1.7.2
@iOSXCUITFindBy (xpath = “xxxx”) @AndroidFindBy (id = “bbbb”) public WebElement usernameTextField;