HTMLevents Click Fire Problem

Started by markgolay, July 01, 2016, 03:49:15 AM

Previous topic - Next topic


I want to click an Odds button on this betting site IE11 , I can login fine, but cant seem to click anything on the website to add to betslip (if your not login in would bring login screen instead of betslip ) , so just need the code to click any odds button, it uses jquery I think , any ideas or help on this would be very helpful , I think maybe "queryselectorall" or exec a script , but Im not a web developer

; ;"Todays Events
   tmp=f.document.getElementsByClassName("m-accWidget__balanceValue ng-binding").item(1)
   if tmp==0
      evt=f.document.createEvent("HTMLevents") ;
      tmp=f.document.getElementsByClassName("m-accWidget__balanceValue ng-binding").item(1)
   custbal=f.document.getElementsByClassName("m-accWidget__balanceValue ng-binding").item(1).innerHTML
   custbal=StrClean(custbal, ".1234567890", "", @FALSE, 2)
   if custbal==0 || custbal=="" ; its null

   evt=f.document.createEvent("HTMLevents") ; does not work
   evt.initEvent("click",@TRUE,@TRUE); ;tried blur,mouseout,keyup,keydown,click, change

   InputCollection = f.document.GetElementsByTagName("A")
   ForEach Input In InputCollection
;              <a class="odds-button fixed enabled" data-bet-type="WIN" data-id-runner="18175227"><span>8/1</span></a>
;This changes when you do normal mouse click
;              <a class="odds-button fixed enabled t_hideOnClickOutside" data-bet-type="WIN" data-id-runner="18175227"><span>8/1</span></a>
;      Input.getAttribute("class").value="odds-button fixed enabled t_hideOnClickOutside"
      if name=="18187289"
;         input.focus()
;   f.document.parentWindow.execScript("javascript:?????????;", "javascript")   ;Submit


Can't say if this is the case here but generally, HTML event problems involve restrictions placed on newer versions of IE COM Automation objects for security reasons and the these problems tend to remain unresolved.    There are several topics on this forum involving HTML events.  You might find reading them instructive.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade


Perhaps there is a hidden DIV associated with the click event. You might try running the process through F12 in IE, or the developer tools in Firefox (which are far superior).