Jump to content

how to select a row from a web table


Recommended Posts

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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)

Link to comment
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)

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Link to comment
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">

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...