Ask a Question

Run Remote Browser: Methods supported

SOLVED
Amytav
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.

16 REPLIES 16
hkim5
Staff

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
Amytav
Occasional Contributor

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.

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
Amytav
Occasional Contributor

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.

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
Amytav
Occasional Contributor

@Justyn ,

Please find the test log attached with failed step details.

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
Amytav
Occasional Contributor

@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.

tristaanogre
Esteemed Contributor

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
cancel
Showing results for 
Search instead for 
Did you mean: