TC not recognizing PrimeNg ContextMenu options

Originally posted by TikiHardBop1 on April 30, 2026

Yesterday, I updated to TestComplete 15.81.7.7 and now my tests are no longer able to select the context menu options. I am able to select a table row and I can right click on that row and the context menu options come up OK. I have code to look for them and TestComplete can find them OK, but the click() doesn’t seem to do anything.

I tried recording tests, and those work, but TestComplete always names them very specific to what is on the screen at the time and in a very odd way e.g. //td[.=“value from cell in table”] which doesn’t work with other data.

In my code, a specific ContextMenu item named Fred will have the xpath:

//p-contextmenu//li[@aria-label=“Fred”]//span[@class=“p-contextmenu-item-label”][.=“Fred”]

I can find it using the Chrome Dev Tools and I have code in TestComplete to verify its existence before I do a click and it exists, but the click doesn’t seem to have any effect.

Any help would be appreciated because this is a very hot task I am working on and will go a long way towards management approving more resources to TestComplete if I can get this done in a short time.

Originally posted by rraghvani on April 30, 2026

There’s a number of issues with the latest version of TestComplete (already discussed in the posts). I suggest you revert back to your previous working version of TestComplete, and log a support ticket of the issue.

Originally posted by Hassan_Ballan on April 30, 2026

Since recording work with XPath

//td[.="value from cell in table"] 

and your XPath fails

//p-contextmenu//li[@aria-label="Fred"]//span[@class="p-contextmenu-item-label"][.="Fred"] 

can you update XPath to and try

//p-contextmenu//li[@aria-label="Fred"]//span[@class="p-contextmenu-item-label"]//[.="Fred"]

Originally posted by TikiHardBop1 on April 30, 2026

I kind of forced myself to update TestComplete because I was beginning to get all kinds of weird issues with the previous release. Those did get fixed, but this new problem popped. TestComplete updates always seem to be a case of the devil you know vs. the devil you don’t know…

Originally posted by rraghvani on April 30, 2026

The only time I will update, is when I’m forced to do so - when TC stops working with the browser. Otherwise, I’ll just carry on using the version that works for me.

The latest version has issues locating the objects in their correct position and being non-responsive. See posts

Elements detected, clicked in wrong location with Chrome | SmartBear Community

and

TestComplete stuck/freeze | SmartBear Community

Originally posted by TikiHardBop1 on April 30, 2026

OK, further data that may or may not clear things up. I’m having issues with it double-clicking on the same table. If you want to click on row 1, you have to do something like //tr[3]/td[1]/div, which leaves you kind of screwed if you have less than 3 rows. I tried using the test recorder when the table only has one row and it works, but when you look at the element that it is clicking on in the Namespace, you discover that it is actually the p-paginator at the bottom of the table! So maybe TestComplete has it’s “aim” off for both the double-clicking and the context-menus.

I did notice that when it tries to right-click on a context menu item, sometimes you get that same menu that you get when you right click on a regular component. Curiouser and curiouser.

Originally posted by TikiHardBop1 on April 30, 2026

Wow, thanks for that update. That seems to be the source of many of our problems. Unfortunately, we do not have control over the settings for our browsers, so we are completely screwed. I am trying to do a project for a major customer and this will not put TestComplete in a good light.

Originally posted by TikiHardBop1 on May 06, 2026

I was able to get a beta release for 15.81 and this fixed the problems for me.