Okay, so this is a piece of the HTML code when I inspect the element
I used PixelSearch before but I'm trying to make this all work with IE being hidden.
This is what I got so far
$Site = _IECreate("google.com")
$HTML = _IEDocReadHTML($Site)
If Not StringInStr($HTML, '"states" : {},') Then
;CODE TO CLICK THE EXIT BUTTON
EndIf
But I'm not sure how to click the EXIT button because I also try and look inside the HTML for the close class,
Try this:
#include <IE.au3>
#include <StringConstants.au3>
_Example()
Func _Example()
Local $sTitle = ''
Local $oIE = _IEAttach($sTitle)
If @error Then Return SetError(@error, @extended, '')
; you solution should start here
Local $sHTML = _IEDocReadHTML($oIE)
Local $aElement = StringRegExp($sHTML, '(?is)<a href="#".*?class="icon i-close.*?/a>', $STR_REGEXPARRAYGLOBALMATCH)
If @error Then Ret