Sivagami

Iterate through doc- table and retrieve data from table content

7 posts in this topic

#1 ·  Posted

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



#2 ·  Posted

More details please. What version of AutoIt are you using? Post a script that reproduces the issue.

Share this post


Link to post
Share on other sites

#3 ·  Posted

12 minutes ago, Sivagami said:

need help on this one very urgently....help me on this please thank you:

Something on fire? ;)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

#5 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted

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

#7 ·  Posted

Can you explain why you need to loop through all forms / tables if you already know which one you want to retrieve?

 

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