Jump to content
aloalo

Handling Clickable Grid Table

Recommended Posts

On the page I am trying to automate functions on, I am trying to click on a TR but _IEAction does not yield the result I am seeking. It seems like I am not really supposed to click directly on TR but in the region the TR is being displayed in the browser, but this is just my theory.

<TABLE>
<COLGROUP>
<COL></COLGROUP>
<TBODY>
<TR>
<TD>
<TABLE class="IccGridHeader iccgrid" __uiObjectID="0">
<COLGROUP>
<COL width=30>
<COL width=30>
<COL width=50>
<COL width=100>
<COL width=100>
<COL class=GwtAlignRight width=100></COLGROUP>
<TBODY>
<TR>
<TD><IMG class=gwt-Image src="Space.gif" width=16 height=16 __uiObjectID="0" __eventBits="133398655" __gwtLastUnhandledEvent></TD>
<TD><IMG class=gwt-Image src="Space.gif" width=16 height=16 __uiObjectID="1" __eventBits="133398655" __gwtLastUnhandledEvent></TD>
<TD>BP#</TD>
<TD>Begin</TD>
<TD>End</TD>
<TD>Total Balance</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD>
<DIV style="POSITION: relative; ZOOM: 1; HEIGHT: 90px; OVERFLOW: auto" __lastScrollLeft="0" __lastScrollTop="0" __uiObjectID="1">
<DIV style="POSITION: relative; ZOOM: 1">
<TABLE style="HEIGHT: 10px" class="clickable iccgrid" __eventBits="1">
<COLGROUP>
<COL width=30>
<COL width=30>
<COL width=50>
<COL width=100>
<COL width=100>
<COL class=GwtAlignRight width=100></COLGROUP>
<TBODY>
<TR class=IccGridColFocus>
<TD></TD>
<TD></TD>
<TD colSpan=3>All billing periods</TD>
<TD>0.00</TD></TR>
<TR class=GridRow>
<TD><IMG class=gwt-Image src="Space.gif" width=16 height=16 __uiObjectID="0" __eventBits="133398655" __gwtLastUnhandledEvent></TD>
<TD><IMG class=gwt-Image src="16x16.gif" width=16 height=16 __uiObjectID="1" __eventBits="133398655" __gwtLastUnhandledEvent></TD>
<TD>001</TD>
<TD>10/05/2015</TD>
<TD>10/07/2015</TD>
<TD>0.00</TD></TR></TBODY></TABLE></DIV></DIV></TD></TR></TBODY></TABLE></TD>
<TD style="VERTICAL-ALIGN: top" align=left>
<TABLE>
<COLGROUP>
<COL></COLGROUP>
<TBODY>
<TR>
<TD>
<TABLE class="IccGridHeader iccgrid" __uiObjectID="0">
<COLGROUP>
<COL width=20>
<COL width=250>
<COL class=GwtAlignRight width=100>
<COL class=GwtAlignRight width=150></COLGROUP>
<TBODY>
<TR>
<TD>&nbsp;</TD>
<TD>Responsible Parties</TD>
<TD>Allocated($)</TD>
<TD>Total Balance($)</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD>
<DIV style="POSITION: relative; ZOOM: 1; HEIGHT: 90px; OVERFLOW: auto" __lastScrollLeft="0" __lastScrollTop="0" __uiObjectID="1">
<DIV style="POSITION: relative; ZOOM: 1">
<TABLE class="clickable iccgrid" __eventBits="1">
<COLGROUP>
<COL width=20>
<COL width=250>
<COL class=GwtAlignRight width=100>
<COL class=GwtAlignRight width=150></COLGROUP>
<TBODY>
<TR class=IccGridColFocus>
<TD>&nbsp;</TD>
<TD>All responsible parties</TD>
<TD>46,621.22</TD>
<TD>0.00</TD></TR>
<TR class=GridRow>
<TD><IMG class=gwt-Image src="Space.gif" width=16 height=16 __uiObjectID="0" __eventBits="133398655" __gwtLastUnhandledEvent></TD>
<TD>1 - LOLOL</TD>
<TD>46,621.22</TD>
<TD>0.00</TD></TR>
<TR class=GridRow>
<TD><IMG class=gwt-Image src="Space.gif" width=16 height=16 __uiObjectID="1" __eventBits="133398655" __gwtLastUnhandledEvent></TD>
<TD>JOHN DOPE</TD>
<TD>0.00</TD>
<TD>0.00</TD></TR></TBODY></TABLE></DIV></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></LABEL></TD></TR></TBODY></TABLE>

I need to select these:

<TR class=GridRow>

Any guidance is greatly appreciated, thank you.

Share this post


Link to post
Share on other sites

Correct, you need to click on the cell, or cell's child object, such as the image.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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

    • By wysocki
      I have a smartphone and I use it to access my email. However, when composing an email on it I have a problem. My list of phone contacts on the phone is very different from my list of email contacts in my Thunderbird desktop app.  I use my Gmail address book to store primarily phone contacts, and I use Thunderbird for my list of email contacts. I wanted a way to get my Thunderbird contact list onto my smartphone to be able to compose emails to addresses in that list. Here's my solution.
      I wrote a script to export my Thunderbird Personal Address Book to a csv file. It then reads that file and re-writes it with html wrappers around the data to make it into a nicely formatted web page. It then uploads the htm file to my website. On my smartphone, I created a shortcut to the file's URL and whenever I click it, I get the list displayed. Each contact shows name and email address along with a COPY button that will put the address into the clipboard. Then in my email client, I can easily paste that address into it. Alternatively, clicking on the actual email link will open a new message dialog in your email client with that address already entered.
      To use the app, all you need to do is use Thunderbird and have a webserver available. You'll need to download the FTPEX.AU3 file from this website and make a few changes to some constants around line 17 for FTP login info, etc.
       
      pab2ftp.au3
    • By SkysLastChance
      What would be the best way to grab the last digits of this <span>? One of the problems I know I am going to have is sometimes it will be 1 digit other times it might be 3. 

      I am trying to get the list of spans and I get this error.

       
      $oInputs = _IETagNameGetCollection($oIE, "span") $sTxt = "" For $oInput In $oInputs     $sTxt &= $oInput.Innertext & @CRLF Next MsgBox($MB_SYSTEMMODAL, "Form Input Type", "Form: " & $oInput.form.name & @CRLF & @CRLF & "         Types :" & @CRLF & $sTxt)  
    • By matwachich
      Hi guys!
      A pretty simple UDF to convert HTML to PDF using wkHTMLtoPDF.
      It uses the C API of the tool (DLL), so no external process, no ActiveX or COM sh*t.
      See the example, and the documentation of wkHTMLtoPDF.
      Cheers
      https://github.com/matwachich/wkhtmltopdf-au3
    • By Colduction
      Hello AutoIt Scriptwriters! 
      I want to read https based site that it's address is: Soft98 (https://soft98.ir/)
      I've tried with "_INetGetSource", "BinaryToString(InetRead)" and "InetRead" but none of them don't help me
       
      How can i get this site html source code without opening IE Windows? 
       
    • By Viszna
      Hello.
      I create a function that saves the log to an html file.
      File html are included picture (conversion to Base64)
      Everything works OK.
      But I do the actions:
      screenshot to the png file (smaller than bmp) per disk (  _ScreenCapture_Capture(@ScriptDir & "\screenshot.png")  ) convert image from disk to base64 I need help to optimize the script:
      - screenshot to memory (do not save to disk) - convert this object to png in memory - invoking the conversion of png image from memory to base64 The first step _ScreenCapture_Capture("") create handle to an HBITMAP in memory
      How to convert image in memory to png?
      How to use Func _ConvertToBase64
      I attach my code
      #include <ScreenCapture.au3> #include <Date.au3> Global $RaportFileName = @YEAR & "-" & @MON & "-" & @MDAY & "_" & @HOUR & "_" & @MIN & "_" & @SEC & ".html" $text = "This is first line text" & @CRLF &"and this is next line" _Raport($text, 1) FileWrite(@ScriptDir & "\" & $RaportFileName, "</pre></html>") ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Raport ; Description ...: ; Syntax ........: _Raport($sText1[, $Screen = 0]) ; Parameters ....: $sText1 - a string value. ; $Screen - [optional] an unknown value. Default is 0. ; 0 - Default - do not screenshot ; 1 - added screenshot full desktop ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Raport($sText1, $Screen=0) Local $sText = "" Local $sHead = "" ; Define HTML file header and style $sHead = '<html>' & @CRLF & '<head><meta charset="utf-8"></head>' & @CRLF $sHead = $sHead & '<style>img{border:3px solid #FF0000;}</style>' & @CRLF $sHead = $sHead & '<style>pre{font-family: monospace;}</style>' & @CRLF $sHead = $sHead & '<style>pre{font-size: large;}</style>' & @CRLF $sHead = $sHead & '<pre>' & @CRLF If NOT FileExists(@ScriptDir & "\" & $RaportFileName) Then ; If file Raport not exist then create FileOpen(@ScriptDir & "\" & $RaportFileName, 258) FileWrite(@ScriptDir & "\" & $RaportFileName, $sHead) EndIf If StringInStr($sText1, @CRLF) > 0 Then ; @CRLF (ENTER) change the @CRLF and 11 space (indentation on width "[GG:MM:SS] ") $sText1 = StringReplace($sText1, @CRLF, @CRLF & '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;') EndIf $sText = $sText & $sText1 If $Screen <> 0 Then _ScreenCapture_Capture(@ScriptDir & "\screenshot.png") $sText = $sText & @CRLF & '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' & '<img src="data:image/png;base64,' & _ConvertToBase64(@ScriptDir & "\screenshot.png") & '"/>' EndIf FileWrite(@ScriptDir & "\" & $RaportFileName, "[" & _NowTime(5) & "]&nbsp;" & $sText & "<br><br>"&@CRLF) ; write to file Raport EndFunc Func _ConvertToBase64($fFile) ;Xroot 2011 ;ClipPut("") ;$FN=@ScriptDir & "\screenshot.png" $FN=$fFile $dat=FileRead(FileOpen($FN,16)) $objXML=ObjCreate("MSXML2.DOMDocument") $objNode=$objXML.createElement("b64") $objNode.dataType="bin.base64" $objNode.nodeTypedValue=$dat ClipPut("") $Wynik = "" ;ClipPut($objNode.Text) $Wynik = $objNode.Text Return $Wynik EndFunc P.S.
      Excuse me my not good English.
×
×
  • Create New...