Jump to content

Recommended Posts

Posted

So all im trying to do is have auto it read 

 

"<div class="title">#1# FREEHOLD In the area </div>"

there no ObjID or name so i cant use either of thoes functions

This is the code i found but im not sure if it applies to read the class

#include <IE.au3>
$oIE = _IECreate ("http://www.test.com", 0, 0, 1, 0)

$tags = $oIE.document.GetElementsByTagName("div")
For $tag in $tags
    $class_value = $tag.GetAttribute("class")
    If $class_value = "Title" Then
        MsgBox(0, "True: ", "Found")
    EndIf
Next

_IEQuit ($oIE)

Ive also tried 

#include <IE.au3>
$oIE = _IECreate ("http://www.test.com", 0, 0, 1, 0)

$tags = $oIE.document.GetElementsByTagName("div")
For $tag in $tags
    $class_value = $tag.className
    If $class_value = "Title" Then
        MsgBox(0, "True: ", "Found")
    EndIf
Next

_IEQuit ($oIE)

But not luck all im trying to do is have it read "#1# FREEHOLD" part and not the while #1# FREEHOLD in the area

im still kinda new to getting objs through IE

Posted

Like so:

#include <IE.au3>

$oIE = _IECreate("https://www.autoitscript.com/site/", 0, 0, 1, 0)
$oCollection = $oIE.document.getElementsByClassName("et_pb_container")
MsgBox(0, "", $oCollection.length)
_IEQuit($oIE)

 

Posted (edited)

https://msdn.microsoft.com/en-us/library/cc304115(v=vs.85).aspx

 

_IEquerySelectorAll($oIE, 'div[class="Title"]')

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

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