Compatability view option

Started by hdsouza, November 09, 2014, 08:35:39 AM

Previous topic - Next topic

hdsouza

I am trying to click the submit button on page http://www.like4like.org/user/login.php
The code will not work untill I enable compatability view option in IE
The command used is:
if Input.name == "submit" then  Input.click

Is there another way without having to enable compatability view?

JTaylor

I usually do something like this to cover all versions of IE.   I just copied and pasted from a script so you will want to tweak it for what you are doing.

Jim

Code (winbatch) Select


      objEvent = ybrowser.document.createEvent("HTMLEvents")
      xlst = ybrowser.document.GetElementsByTagName("INPUT")
      ForEach i In xlst
        If (i.name == "submit" && i.value == "Submit") Then
          If objEvent == "" Then
            i.click
          Else
            objEvent.initEvent("click", @true, @true)
            i.dispatchEvent(objEvent)
          EndIf
          Break
        EndIf
      Next
 

hdsouza

Thanks Jim. That works Great !!!!!!