corvo Posted September 7, 2018 Posted September 7, 2018 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.
Danp2 Posted September 7, 2018 Posted September 7, 2018 I would suggest adding a ConsoleWrite inside your If statement to help identify if the desired element is being found. It's possible that you are locating the correct element, but the click attempt isn't triggering an underlying event. Latest Webdriver UDF Release Webdriver Wiki FAQs
Juvigy Posted September 10, 2018 Posted September 10, 2018 Try with _IEGetObjById instead of _IETagnameGetCollection($oIEmain, "TD") It should be shorter and easier.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now