deviprasad

how to select a row from a web table

10 posts in this topic

Hi All,

i have a table object and there few rows and columns, i would like to click on a table row. please let me know how i can do that

 

here is te html stucture and the highlighted one is the row.Please refer the attachment.

Share this post


Link to post
Share on other sites



pleasre refer the attchment

post-80835-0-84656100-1427724628_thumb.p

Share this post


Link to post
Share on other sites

Haven't tried it myself but if you use Microsofts Internet Explorer I think it should be possible using the IE UDF that comes with AutoIt.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ok , may i know the respective functions to make it work?yes this is Microsofts explorer.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

This should help you out:

_IETableGetCollection()

Click on the function and it will take you to the help file with 2 examples. :)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Depends on what you want to do with the table.
But I would have a look at _IETableGetCollection and _IETableWriteToArray.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

 i triusing below but did not work  , following code xzz x10q is the class name of the table but ddi not work it does not have name attribute. it has only below in html

<table class="xzz x10q" style="width: 848px; position: relative; table-layout: fixed;" cellSpacing="0" _startRow="0" _rowCount="3" _selState="{}" _totalWidth="630">

Local $TB1 = _IETableGetObjByName($oIE, "xzz x10q")
Local $oTable = _IETableGetCollection($TB1, 0)
Local $aTableData = _IETableWriteToArray($oTable)
_ArrayDisplay($aTableData)

Share this post


Link to post
Share on other sites

...you could point to the target table by a number instead of by a name

#include <IE.au3>
#include <Array.au3>

; open the page
Local $oIE = _IECreate("http://yoursite.com") ; target site here
;
; specify by a number which table you want to connect (zero based)
Local $oTable = _IETableGetCollection($oIE, 0) ; get the table as specified in second parameter
;
; get data from required table
Local $aTableData = _IETableWriteToArray($oTable, 1) ; put the data from web table to array
;
_ArrayDisplay($aTableData)

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

Local $oTable = _IETableGetCollection($oIE, 0)

i beive the the second parameter is the index number of the table but how i can find out the index number?

i dnot see below a attrivute call ed index

<table id="pt1:pt_region1:1:pt1:csf1:sflist_pc1:frmsLstPU::1427705397169" style="position: relative;" cellSpacing="0" cellPadding="0">

Share this post


Link to post
Share on other sites

Use my signature...it will make life so much easier for finding complex DOM objects.


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