Jump to content

Trying to get Img Src of Div


Recommended Posts

I am new to AutoIt But i have written in other scripting languages before. 

and i need to get the img src of the div

<div id="DivId">
    <img src="../image/source" class="image"></div>
</div>

This is the divider

$ImageTagsOfDiv = .document.getElementById('DivId').getElementsByTagName('img')
$GetImg = $ImageTagsOfDiv[0]
$Src = $GetImg.src

This is the code i am trying to use and the src of the img

Quote

"F:\AutoIt Scripts\Script.au3" (52) : ==> Subscript used on non-accessible variable.:
$GetImg = $ImageTagsOfDiv[0]
$GetImg = $ImageTagsOfDiv^ ERROR

This is the error it returns, and i do not understand how to fix it. can anybody help?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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