How to eliminate coordinates
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010
07:04 PM
03-16-2010
07:04 PM
How to eliminate coordinates
TestComplete does not recognize the items of a window in the application I'm testing. To overcome this I added the class name of the window in the text recognition filed under open applications. This works in recognizing the item, but upon recording a script I still do get coordinates along with the ID of the item. Below is the example ;
var XTPDockingPaneTabbedContainer = Aliases["matic"]["wndAfx"]["XTPDockingPaneTabbedContainer1"];
MTopicPageBase = XTPDockingPaneTabbedContainer["pageOperations"]["MTopicPageBase"];
XTPDockingPaneTabbedContainer["Click"](118, 31);
MTopicPageBase["Click"](61, 43);
MTopicPageBase["Create_new_part"]["Click"](67, 5);
MTopicPageBase["New_part_name"]["Click"](61, 11);
MTopicPageBase["Remove_original"]["Click"](49, 7);
MTopicPageBase["b"]["Click"](5, 6);
MTopicPageBase["b1"]["Click"](4, 4);
How do i remove the coordinates and still be able to run the script succesfully?
var XTPDockingPaneTabbedContainer = Aliases["matic"]["wndAfx"]["XTPDockingPaneTabbedContainer1"];
MTopicPageBase = XTPDockingPaneTabbedContainer["pageOperations"]["MTopicPageBase"];
XTPDockingPaneTabbedContainer["Click"](118, 31);
MTopicPageBase["Click"](61, 43);
MTopicPageBase["Create_new_part"]["Click"](67, 5);
MTopicPageBase["New_part_name"]["Click"](61, 11);
MTopicPageBase["Remove_original"]["Click"](49, 7);
MTopicPageBase["b"]["Click"](5, 6);
MTopicPageBase["b1"]["Click"](4, 4);
How do i remove the coordinates and still be able to run the script succesfully?
6 REPLIES 6
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010
09:28 PM
03-16-2010
09:28 PM
Hi Divash,
You may just delete coordinates after the script was recorded. In this case TestComplete will perform clicks in the middle of the corresponding control.
You may just delete coordinates after the script was recorded. In this case TestComplete will perform clicks in the middle of the corresponding control.
Regards,
/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
================================
/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
03-17-2010
06:31 PM
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2010
05:00 AM
03-18-2010
05:00 AM
Hi Divash,
Try putting the parentheses after the calls:
....["Click"]();
-----
Alexander
Customer Care Manager
Alexander
Customer Care Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2010
12:32 PM
03-18-2010
12:32 PM
Thank you, this helps a lot as I was thinking of how to eliminate coordinates from my scripts.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2010
05:45 AM
03-29-2010
05:45 AM
I'm running into a similar problem. TC recorded
all.Item(1038).Click(59, 8);
but when I run the script, I get an out of bounds error. When I remove the coordinates and leave the parentheses empty, I get the same error for location (0,0).
all.Item(1038).Click(59, 8);
but when I run the script, I get an out of bounds error. When I remove the coordinates and leave the parentheses empty, I get the same error for location (0,0).
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2010
12:22 AM
03-30-2010
12:22 AM
Hello Davina,
You are likely to have another problem.
First of all, you are testing a web application, this makes a difference. Besides that, you are accessing a page element by ID (1038), while IDs are dynamic and can change from one test run to another. Most probably, the IDs have changed, and now your code refers to a zero-sized page element, and that is why, it can't click it.
To learn more on the matter, see the following FAQ entry:
http://www.automatedqa.com/support/viewarticle.aspx?aid=8914
Also, go through the "Access to Web Pages and Web Page Elements" help topic:
http://www.automatedqa.com/support/viewarticle.aspx?aid=6287
-----
Alexander
Customer Care Manager
Alexander
Customer Care Manager
