Jump to content
Sivagami

Iterate through doc- table and retrieve data from table content

Recommended Posts

Sivagami

The requested action with this object has failed.:
Return SetError($_IESTATUS_Success, $oObject.document.GetElementsByTagName("table").length, $oObject.document.GetElementsByTagName("table"))
Return SetError($_IESTATUS_Success, $oObject.document^ ERROR

 

I get this error when i use _ieTableGetCollection not for all the cases...... need help on this one very urgently....help me on this please thank you:) 

Share this post


Link to post
Share on other sites
Sivagami

Thank you for the quick responce 

Func GetLocalTable(ByRef $oIE, ByRef $TabNO)

    If IsInt($TabNO) Then

        Local $oformA = _IEFormGetCollection($oIE)
        For $oformC In $oformA
            Local $oQuery = _IETableGetCollection($oIE, -1)
            Local $iNumQryC = @extended

            For $i = 0 To ($iNumQryC - 1)
                If $i = $TabNO Then

                    $newElement = _IETableGetCollection($oformC, $i)

                    Return $newElement
                    ExitLoop
                EndIf

            Next
        Next

    EndFunc   ;==>GetLocalTable

 

for security reasons i cant share any more details

ill call this function to get data from a webpage (normal html page and the form build with tables) by passing the table index.

i get this error at _IETableGetCollection but not all the time.

Is the information provided enough??

 

Thank you

 

 

Edited by Jos
added codebox

Share this post


Link to post
Share on other sites
Jos

Added a codebox around the posted code an ran it through Tidy to make it better readable, but the syntax is invalid as it is missing an EndIF

As to the issue, You need to add some error testing to the earlier _IE* functions to check whether they were successful.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Sivagami

Ya about that  i missed the endif while copy paste please ignore it other than that is there any other issues am totally new to this tool. Dont mistake if i ask silly questions

Thank you

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

×