cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically verify object property in script via Keyword test on SFDC

New Contributor

Dynamically verify object property in script via Keyword test on SFDC

Hi all -

 

I'm struggling right now to find many objects on some custom objects in Salesforce Lightning. When I use the record/playback, steps are recording, and the screenshots all look fine, but when I play back, I am unable to select certain elements. Please suggest a method to find these objects - If you need any more information, I can provide it.

 

I am recording in Chrome, is there a better browser to use?

 

For example here's an object I can't figure out out to find, so I can click it (I changed the bolded to remove a company name): Sys.Browser("chrome").Page("https://companyname.lightning.force.com/lightning/r/Contact/0033800002u4K4WAAU/view").Panel(1).Panel..., 1)

2 REPLIES 2
Highlighted
Community Hero

Re: Dynamically verify object property in script via Keyword test on SFDC

Hi,

 

Unfortunately, no good news for you and you will have to take a difficult way regardless of whether you will continue to use TestComplete or decide to try some other tool (including Selenium).

The reason for the above is that your tested application is too dynamic and does not provide any unique and stable identifier for any web element. Thus, you will have to explore (using Object Browser) how application builds its web pages and work-out a logic of how to reliably find this or that web element on the page.

Keyword Test will not be the best one for the implementation and I would suggest to switch to pure scripting.

As a starting point, I would recommend to carefully read the documentation to understand how TestComplete searches for and addresses web elements and, based on the obtained knowledge, consider possible ways of how to search for the required web elements on the page.

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/object-identification/using-...

https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ (and other relevant recordings from the https://support.smartbear.com/screencasts/testcomplete/ page)

 

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 Contributor

Re: Dynamically verify object property in script via Keyword test on SFDC

Thanks Alex, appreciate the response.

New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors