Greetings, i would like to auto-click a button when the page loaded.
I have a file uploader button, im accessing this webapp via iOS, so it popups 2 options (camera, and photos folder).
I tried theese:
- js=“var x=document.getElementsByClassName(”“Button1"”);for(var i=0; i<x.length; i++){ x[i].click();}" ExecuteJavaScript js
- js=“document.getElementById(’”+Button1.ControlID+"’).click();" ExecuteJavaScript js
- js=“function eventFire(el, etype){if (el.fireEvent) {el.fireEvent(‘on’ + etype);} else {var evObj = document.createEvent(‘Events’);evObj.initEvent(etype, true, false);el.dispatchEvent(evObj);}} eventFire(document.getElementById(’”+Button1.ControlID+"’), ‘click’);" ExecuteJavaScript js
none of them fires