I'm trying to build a little script that will take review tests for me. There are several questions on a webpage, and each question is multiple choice (choose one). I want to click on the first one, see if the answer was right or wrong, if wrong, cick on the next one, and if wrong, the next and so on, until I get the right answer. Then I want to go to the next question. An example appears below.
I think I can do the part for once I get to an individual question. What I'm not sure about is how to reliably navigate to the next question. Any ideas? Maybe find the next question mark?
Need some suggestions for how to accomplish this
Moderators: Dorian (MJT support), JRL
Need some suggestions for how to accomplish this
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Grovkillen
- Automation Wizard
- Posts: 1009
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Need some suggestions for how to accomplish this
Can't you just use TAB and SPACE? TAB moves to the next selectable element, SPACE marks the radio button.
Re: Need some suggestions for how to accomplish this
I'll try and let you know! Thanks
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
Re: Need some suggestions for how to accomplish this
No, that doesn't exactly work. Once a question has an answer, right or wrong, the next tab press will go to the top question (Q1) then tab through each answered question until it reaches an unanswered question.
In essence, there is no way to change an answer using the keyboard once the answer generates a right or wrong explanation.
In essence, there is no way to change an answer using the keyboard once the answer generates a right or wrong explanation.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Grovkillen
- Automation Wizard
- Posts: 1009
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Need some suggestions for how to accomplish this
Could take a long time to run but could you look for the "X" Image? i.e. the "X" is on screen hit 'Tab', otherwise hit "Space" and Advance to the Next Question (Could look for a Radio Button with Space Above it to find that).
Re: Need some suggestions for how to accomplish this
Alas, I'm having trouble with WebRecorder thingy shown in the video:
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Grovkillen
- Automation Wizard
- Posts: 1009
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Need some suggestions for how to accomplish this
Reinstall Macro Scheduler.
- Phil Pendlebury
- Automation Wizard
- Posts: 538
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Re: Need some suggestions for how to accomplish this
I would be doing it using screen recognition / capture, it is very fast when using only certain area of screen.
Capture the green "tick" as a small image.
If the text is capturable then use that for A. B. C. etc. Or capture small image of "A." "B." etc.
After each mouse move (as you already have) search left of screen for the green tick.
If it is NOT found move mouse to next letter "B." with mouse offset to click the button.
If it IS found look for next occurrence of "A." with mouse offset to get to the radio button.
Move mouse to there and do it all again.
You will be surprised how quick screen recognition can be, especially if you pair down the area being searched.
Capture the green "tick" as a small image.
If the text is capturable then use that for A. B. C. etc. Or capture small image of "A." "B." etc.
After each mouse move (as you already have) search left of screen for the green tick.
If it is NOT found move mouse to next letter "B." with mouse offset to click the button.
If it IS found look for next occurrence of "A." with mouse offset to get to the radio button.
Move mouse to there and do it all again.
You will be surprised how quick screen recognition can be, especially if you pair down the area being searched.
Phil Pendlebury - Linktree