SkysLastChance

[SOLVED] _IEImgClick Help

6 posts in this topic

#1 ·  Posted (edited)

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IECreate("website")
Local $oForms = _IEFormGetCollection($oIE)

For $oForm In $oForms
    MsgBox($MB_SYSTEMMODAL, "Form Info", $oForm.name)
    _IEImgClick($oForm.name, "Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=12.0.5522.0&amp;Name=Microsoft.ReportingServices.Rendering.HtmlRenderer.RendererResources.TogglePlus.gif", "src")
Next

I am having trouble clicking an image. Here is what I have tried. 

Capture.PNG

Edited by SkysLastChance

Life's simple. You make choices and you don't look back.

Share this post


Link to post
Share on other sites



#2 ·  Posted

Can you link us or post the entire page source so we may test it ourselves?


UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

<snip>

 

Edited by SkysLastChance

Life's simple. You make choices and you don't look back.

Share this post


Link to post
Share on other sites

#4 ·  Posted

For $oForm In $oForms
    MsgBox($MB_SYSTEMMODAL, "Form Info", $oForm.name)
    _IEImgClick($oForm, "TogglePlus.gif", "src")
Next

Does this work? The image doesn't show on my end so I can't test if it clicks.

1 person likes this

UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

@anthonyjr2That did the trick. Thank you very much. I appricate it. :)

Edited by SkysLastChance

Life's simple. You make choices and you don't look back.

Share this post


Link to post
Share on other sites

#6 ·  Posted

#include <IE.au3>


$vCnt = 4 ;The Fourth Image

Do
   $oIE = _IEAttach("Report Manager")
   $oImg = _IEImgGetCollection($oIE, $vCnt) ;The Fourth Image
   _IEAction($oImg,"Click")
   $vCnt += 1
Until $oImg = 0

 


Life's simple. You make choices and you don't look back.

Share this post


Link to post
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

  • Similar Content

    • Spask
      By Spask
      Hi, I'm trying to find a text value inside of a html.
      This is what the line looks like normally:
      <p id="line1" class> <span class="bot">TEXT HERE</span> </p> The text then changes to a non breaking space:
      <p id="line1" class> <span class="bot">&nbsp;</span> </p> And then it changes back to normal text but it's different every time.
      Can I code this so that it grabs the text every time it changes and has a variable that represents it?
      I currently have this inside of my loop:
      $span = .document.getElementsByTagName("span") For $text In $span If $text.value = "&nbsp;" Then Sleep(50) MsgBox(0,0,0) ;messagebox to test if it can be found, but I don't know how to grab the text EndIf Next The problem is that there are many other lines in the html that have the same span but are called "line3", "line5", etc and the one I need is from "line1".
      I will appreciate if anyone can help with this!
    • electrons
      By electrons
      hi  , hope  you all doing well 
       cant find any elements on the page ?  and the right click mouse dont work too?
      iam trying with more than method , i need help please!!
       

    • ur
      By ur
      I have kept below line to wait for IE to load the site completely and continue.
      _IELoadWait($oIE)
       
      But, the code is continuing without waiting for it and I my execution is failing as the elements are not loaded completely.

       
      Any suggestions for alternate code to wait for the browser to load completely?
       
    • ur
      By ur
      We can select elements in IE using their IDs as below.
      Local $oDiv = _IEGetObjById($oIE, "x-auto-16-input") But to one button in the webpage, there is no ID to it.
      In selenium we have option to select this element using the CssSelector and clicked the button using below code in c# selenium.
      driver.FindElement(By.CssSelector("button.x-btn-text")).Click(); What is the alternative for this in AUtoIT?