Jump to content

_IETagNameGetCollection Button Click Question


Recommended Posts

So I have two things I am trying to click.

Policy which works.

$oInputs3 = _IETagNameGetCollection($oIE, "div")
  For   $oInput3 in $oInputs3
  If StringStripWS($oInput3.innertext,1) = "Policy" Then
      $target = $oInput3
      _IELoadWait($target,"",70000)
      ExitLoop
   EndIf
   Next
   _IEAction($target, "click")

 

image.thumb.png.2a328b2e92dc7cca19828a95990adbf0.png

And Add Insurance which I havent been able to get to work. 

$oInputs2 = _IETagNameGetCollection($oIE, "div")
  For   $oInput2 in $oInputs2
  If StringStripWS($oInput2.innertext,1) = "Add Insurance" Then
      $target = $oInput2
      _IELoadWait($target,"",70000)
      ExitLoop
   EndIf
   Next
   _IEAction($target, "click")

image.thumb.png.472d603f053424622bf3ee47b0d88026.png

image.png.60b44b4e6d9e7c3402ad3403db9476fd.png

Any Ideas on what I am doing wrong?  I feel like it might be the spaces between >  Add Insurance  < but I am not sure. 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

That did the trick thank you.

 

$oInputs2 = _IETagNameGetCollection($oIE, "span")
  For   $oInput2 in $oInputs2
  If StringStripWS($oInput2.innertext,3) = "Add Insurance" Then
      $target = $oInput2
      _IELoadWait($target,"",70000)
      ExitLoop
   EndIf
   Next
   _IEAction($target, "click")

I also changed _IETagNameGetCollection to "span" Otherwise it would not click it. 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...