android / android/android-test
webClick with onWebView API not working for a anchor tag element
- 主要言語
- Java
- スター
- 1.2k
- フォーク
- 342
- 平均マージ
- 11時間 29分
- マージ済み PR(30日)
- 2
説明
### Description
- Currently working a test case which initiates a click on an anchor tag with href. Using the XPATH which points to the anchor tag and then performing the webclick. This is not working as of now. Verified the XPATH to get the text associated, which was correct as same as the text of anchor tag.
- Tried using the XPATH, CSS selector and a JavaScript(Which works on chrome console).
### Steps to Reproduce
get an HTML page which holds an Anchor tag Link To Google Try to get the XPATH. Use below code.
onWebView().withElement(findElement(Locator.XPATH, "PATH to Anchor ")).perform(webClick())
### Expected Results
- Initiate the click and open the link in web view as suggested by target
### Actual Results
- No action performed or error thrown.
### AndroidX Test and Android OS Versions
Espresso-web - 3.1.0
Android OS API 28
Espresso version - '3.3.0'
### Link to a public git repo demonstrating the problem:
https://stackoverflow.com/questions/64827652/how-can-we-click-on-html-anchor-with-href-using-android-espresso-webview-library
コントリビューションガイド
調査の方向性
Start with the provided onWebView().withElement(...).perform(webClick()) reproduction and the Espresso-web webClick API. Verify the behavior against an anchor element with an href on Android API 28, then add or update a regression test if the relevant test location can be identified. Done means the anchor click opens its target in the WebView without an error.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, java
- 領域
- mobile, testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100