Recognizing PrimeNg Table Cells
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recognizing PrimeNg Table Cells
We have an application that uses PrimeNg components, v14. The application has a lot of Table components. We are having issues with TestComplete not being able to recognize the individual cells within a table component. The Checkpoint Wizard seems to find them OK, and you can see them in the Object Browswer, but when it comes to running the tests, it cannot recognize the individual cells. We are new to TestComplete, so I am assuming that there are tricks to doing this that we are just not aware of.
So any suggestions on reliably recognizing cells within an Angular table component would be greatly appreciated.
And while I am posting, is there some kind of group just for folks using TestComplete with Angular. I bet there are lots of tips and tricks that we have yet to learn and it would be good to have a central place where we can ask specific questions about this topic.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @TikiHardBop ! To follow up on this, apologies that there is no user group/central area for this specific topic but you can continue to submit your questions in the TestComplete Community if you get stuck. Have a great weekend! 🙂
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> When you hover over the table cell, an icon becomes visible in that cell and you click that icon to do a delete.
I would recommend to either investigate this area of your tested application using Object Browser or to talk to developers and ask them how this functionality has been implemented.
It is difficult to suggest something without seen the actual application (or, at least, a screenshot and corresponding markup), but I may imagine the following scenario:
-- Some script is executed when mouse hovers over the cell and the icon is displayed;
-- This icon might be not actual <img> tag or the like, but be implemented via CSS and thus be not detected by TestComplete.
If my guess is correct, then this can be handled this way:
-- Hover mouse over the cell;
-- Do some delay (say, 0.5 sec) to guarantee that the icon is displayed;
-- Assuming the icon is displayed at the right border of the cell, click the cell, say, 5 pixels from its right border. Something like this: cell.Click(cell.Left + cell.Width - 5, cell.Top - cell.Height / 2);
If the icon is a real object (say, img element), then you should wait until it appears. Like this:
cell.HoverMouse();
var oIcon = cell.FindChildEx("ObjectType", "IMG", 5, true, 5000);
if (oIcon.Exists)
oIcon.Click();
else
Log.Error("Icon was not found");
/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
================================

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »