I simply created this app:
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView view = (WebView) findViewById(R.id.webView);
WebSettings faller = view.getSettings();
faller.setJavaScriptEnabled(true);
view.loadUrl("http://catcheat.net/test/test.html");
view.setWebViewClient(new WebViewClient());
}
}
Now what I want to do is to click programmatically in the unique button that is displayed on the page But I really don't know how to do. I ve read every post like this here but nobody could help me.
This is the HTML page:
<html>
<body>
<form name="pg_frm" method="post" action="https://www.paygol.com/pay" >
<input type="hidden" name="pg_serviceid" value="333818">
<input type="hidden" name="pg_currency" value="EUR">
<input type="hidden" name="pg_name" value="Donation">
<input type="hidden" name="pg_custom" value="">
<input type="hidden" name="pg_price" value="0.5">
<input type="hidden" name="pg_return_url" value="">
<input type="hidden" name="pg_cancel_url" value="">
<input type="image" name="pg_button" src="https://www.paygol.com/webapps /buttons/en/white.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" >
</form>
</body>
</html>