Contributions
Re: Wait for Xpath
I belive you'll have to write your own timing loop. Is there a reason you couldn't do something roughly like this: var refreshMillisec = 500; var maxWait = 10000; var myControl; do { Delay(refreshMilliSec); elapsedTime += refreshMilliSec; myControl = Page.FindChildByXPath("//*[@id='dvActionbtnArea']//a[node()[contains(., 'Add')]]"); } while (!myControl.Exists && elapsedTime <= maxWait); if ( myControl.Exists && myControl.Enabled ) myControl.Click(); --Or this nice timing mechanism using aqDate I copied some time ago from others: var now = aqDateTime.Now(); var giveUp = aqDateTime.AddSeconds(now,(maxWait/1000)); do { Delay(1000); myControl = Page.FindChildByXPath("//*[@id='dvActionbtnArea']//a[node()[contains(., 'Add')]]"); now = aqDateTime.Now(); } while ( !myControl.Exists && now <= giveUp); The timing variables could be parameterized and the logic broken into a general function.1.4KViews1like0CommentsRe: aqString.Trim() is not removing nbsps as whitespace
Hi Alexei, Fast forwarding to now, is there any chance that aqString.Trim() will be enhanced to remove trailing   from innerText? I just discovered this limitation the hard way in attempting to compare a test value against a cell’s trimmed innerText. Until then, will the aqString.Replace() or an aqString substring method dispatch those pesky non-breaking spaces? It would help to know before I lose more time trying a regular expression replacement or substring comparison scheme, only to find blocking limitations with those as well. I am reluctant to experiment with Utilities because it was obsolete a year ago when it was suggested as an alternative. Thanks,2KViews1like0CommentsRe: Catch "There was an attempt to perform an action at a point, which is beyond the screen" error
Ruben, Although you have solved your problem, I can't help think that your problem was similar to one I struggled with. If so, you might find this helpful or interesting. Our browser application is developed in AngularJS. I use FindChild and a keyword-to-property/value mapping for object acquisition in my scripts. (Not TestComplete’s Name Mapping and Aliasing). In our AUT, a button click would open a dialog (“Panel”/Div/modal class) whose existence and visibility I wanted the automated script to validate. When the dialog was open, Object Spy reported its visible and visible-on-screen properties as true. But when the script ran and opened the dialog, it reported the dialog as not visible and returned a failure. When running the script in debug mode, inspection of the dialog object after it was acquired showed its visible properties to be false, even though object spy reported these as true. It was not a timing/synchronization issue. Why did findchild at runtime report the dialog as not visible while Object Spy reported as visible? I cracked open the html with firebug in Firefox and saw this: There were 4 instances of the dialog, and 3 of them were grayed-out. That is, every time the dialog was opened and closed, the html code for the object remained, but only one of them was “active”. Object Spy saw the active instance, but findchild happened to find one of the 3 “inactive” instances. So, a little more exploration allowed me to find an attribute that could distinguish the “active” instance from the others and the simple addition of a property and value to the mapping allowed findchild to acquire the active instance and the problem was solved. I wonder if you were facing the same condition and hope this long response was at least interesting. :-) @ Andrey: Thanks for that suggestion; that may be handy sometime.4.1KViews0likes0CommentsHopefully helpful: NativeWebObject and custom attributes in IE
In case this may be helpful to someone, I will share this issue. In the browser application in which I am attempting to automate functional tests, I looked to employ NativeWebObject.Find to identify objects by custom content attributes; in my case an AngularJS attribute such as ng-click. I was seeing this method work well in Firefox and Chrome, but it was failing in Internet Explorer 10. The SmartBear support team, in a pretty quick analysis and response, discovered that this is due to a change by Microsoft to its implementation of content attributes in IE 9 and later. (My layperson’s summary of the problem). SmartBear support provided this link that may be informative: http://msdn.microsoft.com/en-us/library/ie/gg622931.aspx. They also said they would try to implement a means to overcome this problem.1.9KViews0likes2CommentsRe: keyword test data driven loop dropping leading zero
I encountered a similar problem in the past also and found the solution to be the same: force the test data to text so TestComplete will interpret it as a string. But also, my understanding is that setting Excel pages or columns to be of type text still does not guarantee that TestComplete will interpret a cell value as a string. The only way to force this reliably is to precede the value in the cell with a ' (single quote). So Kyle could force the test data to text this way instead of using .csv file if Excel is preferable.2.7KViews1like0Comments