cancel
Showing results for 
Search instead for 
Did you mean: 

Click method not accepted in chrome

SOLVED
Senior Member

Re: Click method not accepted in chrome

Hi Vivek72

 

Even i have similar problem in clicking the buttons in  span elements.i'm working in Chrome browser.

I can able to find those buttons through "FindChildByXpath() and EvaluateXpath() methods " but throws back an error while clicking those buttons as "Click is not a function".

So Please suggest  a way to resolve this issue. 

Highlighted
Community Hero

Re: Click method not accepted in chrome

Hi,

 

As it has been noted several times on this forum, search by XPath is the worst approach in TestComplete's world and should be used only when nothing else works.

One of the reasons for this is that (as it is noted in the documentation) search by XPath may return either object that is wrapped (supported) by TestComplete or native DOM object.

.Click() (with the capital 'C') is the wrapping method provided by TestComplete. Obviously, it is inaccessible for native DOM elements.

The generic approach if searching UI elements by XPath:

-- Search for the element;

-- If the element was found, check whether the native DOM element or the element wrapped by TestComplete was returned (to do this, you can check if some property specific to TestComplete (e.g. .Exists one) is supported with the help of the aqObject.IsSupported() function);

-- If the returned object is supported by TestComplete, you can use both TestComplete-specific and provided by DOM methods;

-- If the returned object is a native one, only native DOM methods (with some possible limitations) can be used in test code.

 
Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2
Top Kudoed Authors