Moving between multiple HTAs - hta

The scenario...
HTA #1 is launched, which displays a window with three button choices.
[Process]    [Postpone]    [Exit]
If the Process button is clicked, HTA #1 is closed, a process is started in the background, and HTA #2 is launched, which displays a window with further information that remains open as long as the process is running. Once the process has completed, HTA #2 is closed and HTA #3 is launched, which displays a window with further information and a single [Exit] button. Once the Exit button is clicked, HTA #3 is closed and that's it.
If Postpone is clicked, HTA #4 is launched, which displays a window with further information and a single button to ask the user to verify their choice. Once the user clicks the button, HTA #4 is closed and that's it.
If Exit is clicked, no new windows are launched, HTA #1 is closed and that's it.
I have each of the individual HTAs complete, but just can't figure out how to move between them.
Is this possible? If so, how? If not, is there an easier way to accomplish this?

Related

Robot Framework: Issue finding and clicking elements after opening and switching to the new tab

After Switching the tab (works perfect!), I am not able to find anything on the new tab and I am not able to continue my test. Anyone has any ideas please ?
Test case 1
Click Element //*[#id="tabIndex1"]/div[2]/div[2]
Sleep 3 seconds
#{WindowHandles} Get Window Handles
Switch Window ${WindowHandles}[1]
Sleep 1
Switch Window ${WindowHandles}[0]
Sleep 1
Switch Window ${WindowHandles}[1]
Sleep 1
Wait Until Page Contains Element //*[#id="element1"]
Click Element //*[#id="element1"]
Can you try the following :
Switch window | title=abc
where, abc is the title of the particular new page opened, you can get the title by inspecting

Autoit MouseClick not successfully clicking [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am attempting to make an automation for a browser game on kongregate, minequest. I've created a code that is supposed to click a series of buttons however while the mouse moves, the mouse doesn't always successfully click. No errors are given and each time I run the code different clicks fail. I have tried adding more and more time between clicks to the point that I now have 1 second wait times, repeat the clicks at least twice, etc. to try to ensure a click happens but clicks still don't always happen.
I have windows 10, mouse pointer scheme is set to none, I am using google chrome as the browser.
Edit: FYI I have made other automations that work just same with the same browser, same computer, etc. I currently have gotten this code working by having it click 10 times instead of 1 but that shouldn't be necessary and I would like to understand why this phenomenon is happening.
I had a very similar problem, and it turned out that some programs didn't register my clicks because by default, Autoit only holds down the mouse click for 10ms, which wasn't long enough for it to register on some programs.
Setting
Opt("MouseClickDownDelay",50)
fixed it, by increasing the length of each click to 50 milliseconds.
Sometimes an application might not react on "click", but on "button status". MouseClick might not have enough time between "Press" and "Release" for those applications to notice that the button is "down". (Your description ("working one time out of two to ten") supports this oppinion). To give that application a proper "Button is down", a mousedown, sleep, mouseup sequence should work.
If you don't have trouble with a mouseclick "by hand", a sleep time of 100 - 200 ms should be fine.

How to close a window pop up when its opened by Click Link in Robot framework?

While executing a Test Case in RIDE, I clicked a link as
Click Link ${MAND}
and then it opens a window, after that I want to close the Window for that am using
Click Button Close / Close Window
none of these are helping me to close the window.
Once the window is opened it is not doing any operations.
I would like to do:
Click Link ${MAND}
Click Button Close
I am not able to perform the operations within the window. Is it because of the Click Link its directly opening a window, or do I need to write something for the window before I close it.
I have tried:
Execute Javascript document.getElementById("aspnetForm").click();
Click Button Close
Close Window
I dont think I am able to take control of the newly opened window.
You want to select the window before closing it
${windows}= Get Window Names
select window cc
sleep 1s
close window
Click Button Close
Sleep 2s
Select Window main
Sleep 2s
Unselect Frame
Sleep 2s

QProgressDialog not run a second time?

I am working with QT creator and he has emerged a problem I could not solve ... I'm on a gui application, where I have a window with a button that calls "Scan" which when pressed runs a QProgressDialog while running a code that has a cycle heavy while .. up there all right, the problem arises when I press the cancel button of QprogressDialog, normally closed and asks if dialog.wascancelled cycle () break. everything perfect until the dialog closes the cycle is interrupted and return to my initial window .. But here is where the problem is if I press the button "Scan" opens again but his condition qprogressdialog wascancelled () remains true, which upon entering the cycle and ask if wascancelled () automatically goes without nothing ... As I can do to change the status of wascancelled () to false?, There are some property for this or I can do to achieve my goal to avoid breaking the cycle after entering a first time?
You should call QProgressDialog::reset().

Close all popup dialogs when main window closed in ASP.NET

In my web application a lot of popups opened from the parent window using 'window.open'. So I want to close all those popups when my application's main window is closed. How can I do that?
It's a bit problematic to know that the user closes the window but assuming you do achieve that (by a close button or subscribing to the beforeUnload event) you can close the opened windows by following the next bullets:
When opening a window, save its
object which is returned from the
window.open method (preferably to an
array so you have all objects in a
central place).
When you find out the main window is
closing, execute the close method
on the saved window objects.
Another possibility:
Use timer on the opened windows to
check if opener is defined (you
can try to use typeof on a method in
the opener page).
When you find out the opener doesn't
exist, close the window.
There's no callback that will notify you that the user closed his browser.
its not possible! You cannot catch browser close event.
You can use model popups to be sure user closed popups before closing the main window.

Resources