Click on elements on custom webview by class name

i tried to do that by :

> document.getElementsByClassName("fa fa-paypal").click;

Screenshot_3

and it’s not working …

I know I can use ID, but I want to use Class
There is no other class with the same name in the site

@vknow360

Run:

document.getElementsByClassName("fa fa-paypal")[0].click();
OR
document.getElementById("paypal").click();
1 Like

thx very very much , But can I know what this zero is referring to?

@vknow360 thx very very much , But can I know what this zero is referring to?

0 refers to the first element of array returned by that query.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.