I am trying to create an object for dynamically generated HtmlInputText and HtmlButton using HTML find expression by providing the following properties of the element - id, Tagname, name and Xpath, but the element is not getting identified, getting element not found error.
- The text and button object that needs to be identified is available in one of the Cell in Table (Rows in the table gets dynamically added based on user input).
Please provide the solution for identifying these dynamic objects using Telerik asap.
5 Answers, 1 is accepted
We've had this issue before and have gotten around it by reducing the number of attributes in our identification logic. It looks like you are identifying on four attributes for your element. Could you possibly reduce that to two? Additionally, our "id" attribute is dynamically generated, so we are unable to use that attribute for our elements--might yours also be dynamic? Lastly, you could also try to refresh the DOM tree with a coded step:
I have already provided the below line of code in my code, also i have tried with different combinations of properties and element types. still it was not working
You have a ticket opened regarding this case (ticket ID 729185) and here is the latest reply from my co-worker Velin:
Thank you for contacting Telerik Support.
You should be able to achieve this. You can read in this article how you can change the find expression. I would also recommend you to see this article about using chained find expressions.
You might find useful watching this short video that will show you some good practices how to work with find expressions.
You can also achieve this only in code, you can use our documentation as a guide-line.
If you need additional assistance, in order to help you best, please provide us with a copy of your test and if it is possible, grant us access to your application so we can reproduce the issue on our end and give you a solution.
If direct access is not possible, capture a Fiddler trace and attach it to this support ticket in a zip file. If you are unfamiliar with how to do so, this link will provide you with step-by-step instructions for download and use. Please make sure to enable 'Decrypt HTTPS traffic' and 'Store binaries' options (see attached image) before starting capture.Let's keep the communication on one place (here) in order to avoid double work.
Thank you for your understanding.