|
Rank: Member Groups: Member
Joined: 3/19/2015 Posts: 10
|
<button value="1" class="_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy" data-ft="{"tn":"+{"}" type="submit">Paylaş</button>
I wanna press share button and here is my code: webControl1.WebView.EvalScript("document.getElementByClassName('_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy').submit();");
but it does not work. How can I press this button?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
If you just want to post the form, you can call submit method on the form element instead of on the submit button.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 129
|
Hi,
Your JS code must be : document.getElementsByClassName('_42ft _4jy0 _11b _4jy3 _4jy1 selected _51sy')[0].click();
the document.getElementByClassName() function doesn't exist in JS.
or as eo_support says just use the submit() method on the form element.
You can call the form element directly by his name like : my_form_name.submit();
|
|