React Material UI (selection boxes)

1 Answer 53 Views
Coded Tests Test Recording
Michael
Top achievements
Rank 1
Michael asked on 09 May 2023, 01:36 PM

Hello,

we would like to test our website automatically with the test studio. The website was implemented in React using the Material UI framework.

Unfortunately, I can't control the selection boxes either through a recording or programmed in the visual studio.

Is there a way to control these selection boxes (https://graphviewer.deprag.com/settings, generalsettings language)?

Thank you.


1 Answer, 1 is accepted

Sort by
0
Accepted
Elena
Telerik team
answered on 10 May 2023, 03:21 PM

Hi Michael,

Thank you for sharing a sample of the selection boxes you experience troubles with - this is very helpful for me to understand the case. 

Based on the sample app I assume that you need to adjust the find expressions recorded for the Test Studio elements. That find expression is then used to match the recorded element to an element from the application's HTML. Depending on the appliction structure and elements representation in the DOM tree, Test Studio might also generate chained find expressions

The elements find expressions are generated as per the Smart Find Logic settings and sometimes there default order might not be ideal. So, one option is to adjust the attributes list so that these better fit the application's specifics. Another option is to leave the list as it is and modify the expressions for only specific elements.  

In the case of the sample application I recorded a test to change the language in the settings. So, the initial find expression generated for the dropdown element is a chained one, but doesn't seem very reliable - see initial-FE.png. I explored the DOM tree and how elements are listed there. So, I found that there are much more useful attributes like the id of the div, which represents the dropdown control. So, I changed the find expression of the element to that in modified-FE.png

Please, take the time to check this on your side and let me know if you have additional questions. Thank you for your cooperation in advance.

Regards,
Elena
Progress Telerik

Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Tags
Coded Tests Test Recording
Asked by
Michael
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or