waiting until the control is activated when sending keys
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
waiting until the control is activated when sending keys
var bankName = genIdentPath;
var tempbankName = context1.get("bankName");
if((aqString.GetLength(tempbankName) != null)) {
b = bankName.PwcAutoComplete("p_bank_codeCoB").TextInput(0);
if(b.Exists) {
b.Keys(tempbankName);
}
} else {
Log.Message("");
}
Example 2
//select branch name
var branchName = genIdentPath;
var tempbranchName = context1.get("branchName");
if((aqString.GetLength(tempbranchName) != null)) {
branchName.PwcAutoComplete("p_branch_codeCoB").TextInput(0).Keys(tempbranchName);
} else {
Log.Message("");
}
Execution stops and spend 10-15 seconds with the following message "waiting until the control is activated"
This Controls are picked up as TextInput than ComboBox
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My best guess on this is that something about your TextInput control prevents interaction until it has been clicked on. Try starting with something like (in your first example) b.Click(); followed by the Keys method. Give this a try and see what happens.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robert,
I did that, funny enough the click is Instant but moving to the next line it still takes time to enter the data
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Just a possible idea...
What happens if you manually typing fast in the control? Does some delay occurs?
My guess, based on the fact that the control looks like a combo-box, is that when you start typing, some ajax request is sent to the server asking for the filtered data been suggested and the input into the field is postponed until the response is obtained from the server and processed on the client (web page).
If this is the case and you are not interested in the suggested data, you may try to assign data to the control directly via either the .SetText() method, or via the .Value property or whatever else this given control supports and then (optionally, if needed) send something like .Keys("[Enter]") to emulate as if the user pressed some keyboard key and trigger script linked to the control.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
.Keys("[Enter]") also triggers the "waiting until the control is activated", .SetText() is not part of the actions listed for that control.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What does TestComplete "see" when you record actually interacting with the drop down control? Could it be more efficient to work with that rather than with a keyboard interaction?
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I resorted to recording the interaction then use the code to my script. Its working better in that way.
