cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

selenium testing thingworx

SM_10003989
4-Participant

selenium testing thingworx

Hi Community,

Need your help. We are doing a automation test module for Thingworx mashups. Facing a challenge in reading dropdowns using selenium webdriver for chrome using python. Strange part is in the page two dropdowns- Device and Region are getting clicked in auto test suite, but when selecting country dropdown(which is based on Region) it is failing. How can we select elements, which approach is better and how to achieve that. I tried by selecting the div id of the dropdown but then it selects the first value as text value- For example Select Country or Select Region. But even it that case the automated click does not happen. Anyone having similar experience please share your thoughts.

4 REPLIES 4

Some similar discussions on this earlier:

 

You're encountering a common but tricky UI automation issue in ThingWorx mashups, particularly when using Selenium. ThingWorx mashups often involve dynamic binding, delayed rendering, and custom widgets that do not behave like standard HTML select elements, which is why dropdowns, such as Country (dependent on Region), can break automated test flows.

 

Maybe try:

  • Use WebDriverWait to wait for element visibility, clickability, and list population.

  • Avoid hardcoded sleep, and always wait for UI updates tied to dynamic mashup bindings.

  • Use XPath or CSS that targets the dropdown's actual list items (not the div container).

  • Think like the browser, don't try to click on an item before it exists or is enabled.

 

 

 

Shashi Preetham,
+91 8099838001 | shashi@psptechhub.com,
PSPTechHub  ||  World of PTC Thingworx  ||  LinkedIn

Hi @SM_10003989 

 

Did you find the suggestions from @pshashipreetham helpful?  If so, please mark his response as the Accepted Solution. 

 

If you're still having issues, were you able to glean any additional information from the previous suggestions that might aid in helping us to find a solution?

 

Regards.

 

--Sharon

Hello @SM_10003989,

 

ThingWorx widgets are Web Components, and use shadow DOM extensively. Make sure you account for it: https://www.geeksforgeeks.org/software-testing/shadow-dom-in-selenium-webdriver/

 

/ Constantine


Vilia (my company) | GitHub | LinkedIn
Announcements


Top Tags