Jump to content

Recommended Posts

Posted

Hi there.. I'm trying to click a TD cell inside a table that has been created to simualte a date picker calendar.

The page has two of these date pickers, One for starting date and the other is for the ending date. I just want the starting date to be always set to 1.

I tried the below but it didn't work.

#include <IE.au3>
#include <MsgBoxConstants.au3>
$oIEmain = _IECreate("the webpage")
_IELinkClickByText($oIEmain,'the link that leads to the calendar page')
_IELoadWait($oIEmain)
$oTDs = _IETagnameGetCollection($oIEmain, "TD")
For $oTD in $oTDs
    If String(_IEPropertyGet($oTD, "innertext")) = "1" Then
        _IEAction($oTD, "click")
        ExitLoop
    EndIf
Next

 

Attached is a photo of the code from inspect screen. we only have the "value" in hand, as the ID is dynamically changing when the page is refreshed.

 

 

 

Untitled.png

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...