When pushing buttons with COM Automation, I've found that the U
Chad,
When pushing buttons with COM Automation, I've found that the User tool isn't
always ready to receive the next command when it gets the instruction from the
script. Specifically, when you issue the command to change focus to the
button, followed by either a carriage return or space character, you can't
count on the interface to wait until focus on the button. So I normally issue
a short sleep command in between SendKeys calls. Here's an example snippet in
JScript:
var app, sess, form;
var VISIBLE = 1, INVISIBLE = 2;
var AR_SUBMIT = 1, AR_QUERY = 2;
var AR_DISPLAY = 3, AR_MODIFY = 4;
app = new ActiveXObject("Remedy.User");
wsh = new ActiveXObject("WScript.Shell");
sess = app.Login("Demo", "", VISIBLE);
form = app.OpenForm(sess,"localhost", "TAW:Dog", AR_SUBMIT, true)
form.GiveFieldFocusById(606084201);
WScript.Sleep(1000);
wsh.SendKeys("%{DOWN}");
WScript.Sleep(1000);
wsh.SendKeys("{DOWN}");
WScript.Sleep(1000);
wsh.SendKeys("{ENTER}");
I think Alt+Down Arrow (%{DOWN}) should open a menu.
Tim Widowfield
[EMAIL PROTECTED]
http://www.widowfield.com
----- Original Message ----
From: Hall Chad - chahal <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, December 5, 2006 6:12:54 PM
Subject: [ARSLIST] COM Automation
**
Has anyone had any luck using Remedy User’s COM automation to properly control
an instance of Remedy User? I’m using a VBA scripting app (Compuware
TestPartner) to create regression testing scripts of our Remedy applications.
I’m having two main problems:
Issuing a “click” on buttons. I can usually get around this by using a SendKeys
command to send an Enter command after setting focus to a field. But this only
seems to work sporadically.
Triggering “Menu/Row Choice” workflow on selection of Selection or Character
menus. I can set a text value to these fields, but that doesn’t trigger
Menu/Row Choice workflow. I can’t get any SendKeys commands to open the menu at
all, so I really have no workaround for this one.
I’ve also been tinkering with controlling Internet Explorer for Mid Tier
regression testing. Although that too is quirky. For instance, the browser
window will split in half (one half the form, the other half entirely blank)
when clicking on drop down buttons. There are a few other oddities as well.
I’m not a VBA expert or an automation expert. So any advice you can give would
really be appreciated. I know BMC does similar regression testing using Silk,
but I have yet to get answers on how they handle these limitations.
Thanks,
Chad Hall
CHAD HALL
ACXIOM
Remedy Software Developer
Information Systems Development & Reporting (ISDR)
(501) 342-2650
*************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.
If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.
If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.
Thank you.
*************************************************************************
__20060125_______________________This posting was submitted with HTML in it___
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the
Answers Are"