cancel
Showing results for 
Search instead for 
Did you mean: 

Run Remote Browser: Methods supported

SOLVED
Highlighted
Occasional Contributor

Run Remote Browser: Methods supported

Hi,

We have some existing keyword tests with scripts where we use methods EvaluateXpath, FindChildByXpath etc.

Now we are running the same keyword tests through the Run Remote browser utility to perform crossbrowser tests across browsers/devices. The test seem to be failing at steps where EvaluateXpath, FindChildByXpath are used. What is the workaround to make the existing scripts compatible with cross browser tests through Run Remote Browser?

Any help will be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Run Remote Browser: Methods supported

@Amytav :

 

Hi,

 

Just o sum-up: as @hkim5 already wrote, new cross-platform mode introduced in TC 14.40 is not compatible with old test code and works only for the new projects that use .FindElement() and .WaitElement() page methods only.

The reason is that cross-platform mode runs Selenium under the hood and two mentioned methods are the only ones that are translated to Selenium calls during runtime.

All other methods provided by TestComplete are not translated to Selenium calls and thus cannot be used for cross-platform testing.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

16 REPLIES 16
Highlighted
Staff

Re: Run Remote Browser: Methods supported

you will need to create a new project and enable the scalable web tests setting to use the run remote browser step. the reason being that the way objects are identified are completely different (the older, existing tests will use the traditional name mapping with object properties, whereas the new scalable web tests that work with the run remote browser step will use the .findelement method to identify each of the objects that you are interacting with). with that said, to answer your question, there is no way to make your old tests (that use the old name mapping) work with the run remote browser step

Best,
Justin Kim
Highlighted
Occasional Contributor

Re: Run Remote Browser: Methods supported

Thanks Kim, for your reply.

We are not using any name mapping objects in our scripts. Scripts are failing at the EvaluateXpath step (refer image attached, highlighted step). These scripts do work with virtual browsers, desktop local browsers, only failing with the Run Remote browser utility.

Highlighted
Staff

Re: Run Remote Browser: Methods supported

ok, one last really obvious question that I have to ask is, have you purchased a Device Cloud add on for your TestComplete instance?

Best,
Justin Kim
Highlighted
Occasional Contributor

Re: Run Remote Browser: Methods supported

Hi Justin,

Not yet purchased. Evaluation with trial version is being carried out now. So the device cloud is enabled but under a trial license.

Highlighted
Staff

Re: Run Remote Browser: Methods supported

ok, thats probably not the issue then. If you could then share the test logs with the details of the step where it failed, would be more helpful in debugging this error (especially if the function passes on local browers, and only fails when we use the run remote browser added in.)

Best,
Justin Kim
Highlighted
Occasional Contributor

Re: Run Remote Browser: Methods supported

@Justyn ,

Please find the test log attached with failed step details.

Highlighted
Staff

Re: Run Remote Browser: Methods supported

could you try replacing the EvaluateXpath with the findElement method instead? https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/page/findelement-meth...

syntax should be similar

Best,
Justin Kim
Highlighted
Occasional Contributor

Re: Run Remote Browser: Methods supported

@hkim5 Tried with FindElement and it works but it does not serve the purpose here. What I am looking for is the collection of objects having same XPath, which EvaluateXpath's array length property can provide.

With FindElement, it is returning the first occurrence of this object so no way to know how many similar objects exists in the page.

Highlighted
Community Hero

Re: Run Remote Browser: Methods supported

Is there a FindAllElements?

 

Of, you could use FindAllChildren?  That's a bit more of a conventional find that will return an array of objects with similar properties. 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors