org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:
See original GitHub issueThe 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
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (10 by maintainers)
Top Results From Across the Web
How to fix "Can't locate an element by this strategy
How to fix "Can't locate an element by this strategy: Locator map:" · Your xpath is incorrect. You are missing a @ in...
Read more >org.openqa.selenium.NoSuchElementException: Can't locate ...
org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map: ... Element is visible but still Appium is not ...
Read more >Unable to locate element throwing a org.openqa.selenium ...
Selenium is not able to find the element. Either check the selector that you have used, or if the element appears after some...
Read more >Everything you need to know about NoSuchElementException ...
A NoSuchElementException occurs when the Selenium locator strategy defined is unable to find the desired HTML element in the web page. ...
Read more >Unable to find element selenium python
Org openqa selenium nosuchelementexception can t locate an element by this strategy : locator map. org.openqa.selenium.NoSuchElementException: Can't ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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;