Hi Folks
I am wondering how do I factor in either a wait option or until option to click on the download hyper text.
I can't really factor in 'wait' as the time depends on how many transactions for the day, so it could run quicker or in my case slower.
There is a value that changes from "Processing" to "Download" but how do I tell Macro Scheduler to keep looking until this changes and then progress to the next function?{
Looking forward to your reply
Waiting for Download Option
Moderators: JRL, Dorian (MJT support)
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
Re: Waiting for Download Option
It depends on what changes on the page once the download is ready. If some tell-tale element appears once it's ready you could detect for that. If the link doesn't appear until it's ready, then you can keep looking for it until it exists.
This loop will keep looking for it while it doesn't exist, and will then continue once it's found. I'm guessing you're trying this on Chrome/Edge, using the Chrome/Edge functions and are already familiar with ChromeDriver etc. :
If using the IE functions you can use IEWaitForText or IEContainsText.
In more complex cases sometimes grabbing the page source can help too.
I hope this gives you a good starting point, but I can give you a more specific answer with a more specific question.
This loop will keep looking for it while it doesn't exist, and will then continue once it's found. I'm guessing you're trying this on Chrome/Edge, using the Chrome/Edge functions and are already familiar with ChromeDriver etc. :
Code: Select all
let>TheURL=https://www.mjtnet.com/example-form/
Let>CHROMEDRIVER_EXE=c:\chromedriver.exe
ChromeStart>session_id
ChromeNavigate>session_id,url,%TheURL%
let>elements_count=0
While>elements_count<1
ChromeFindElements>session_id,name,FirstName,elements
Wait>1
Endwhile
In more complex cases sometimes grabbing the page source can help too.
I hope this gives you a good starting point, but I can give you a more specific answer with a more specific question.