please guide me I want to know How to make an automatically click on a web link inside web view in my android application?
Asked
Active
Viewed 406 times
-1
-
1what do you want? Autotest or do it programmatically inside the app? – Vyacheslav Aug 15 '16 at 10:02
-
@sia121 You can go through this link http://stackoverflow.com/a/4075955/2293534 – SkyWalker Aug 15 '16 at 10:05
-
i want using programmatically inside my app – sia121 Aug 15 '16 at 10:07
-
this may help you http://stackoverflow.com/questions/35708453/how-to-automatically-click-a-button-in-android-after-a-5-second-delay – Krishna Kachhela Aug 15 '16 at 10:08
1 Answers
0
As Lee Chou stated,
Use Javascript to handle the "clicking" in the Webview:
- Extend WebViewClient to handle onPageFinish
- Check if the url is correct
- Run the javascript code with webView.loadUrl("javascript:" + jsClickButton)
Caution: This method is very fragile, so this is not recommended unless the site is your own.
You can also go through from here: http://howtrick.com/make-android-website-app-using-web-view-android-studio/

SkyWalker
- 28,384
- 14
- 74
- 132