Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I've just discovered this awesome low level control object,

Set mouse = CreateObject("Mercury.DeviceReplay")

which allows me to do cool things like

mouse.DragAndDrop x, y, x+60, y, 0

My problem is that my monitor set up can prevent this from working: I have two monitors, my main monitor is on the right. Should the application under test be on the left then the x in my method, the abs_x of the object under test, has a negative value. This generates an error. Is there a code-solution to overcome this? I'm happy a different function, or perhaps a means of moving the Browser object to a different monitor.

One of my attempts involved trying to code looping (Windows key + Left) until x has a positive value. I couldn't work out what to write to make that happen though. Suggestions welcome.

share|improve this question
    
What are you actually doing with the mouse? It is cool that you can move the mouse, but is it useful? In our QTP tests, we only use direct mouse control if there is no other option (and we actually have always found another, better option). If the application under test is displayed on a different computer/monitor configuration, will the object being acted upon always be in the same location? Also, I use multiple monitors, but find that I sometimes get odd behavior from QTP if it is on the secondary monitor, so I always have QTP (now UFT) in the primary monitor. –  John Oglesby Oct 11 '13 at 15:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.