Sameen Javid
Sameen Javid

Reputation: 37

imacros detect object with dynamic changing id

I am making a script to detect a date picker and select some date from it. The issue is that my date picker has id which changes randomly and is auto generated. When i rerun the script it gives the error that object not found since date picker id is changed. Class name for my date picker is also not constant, the only thing constant is name. Please help me how can i detect an object using name of the element or how can i pass my dynamically changing id of the element to my macro for my script to run successfully.

Upvotes: 0

Views: 3471

Answers (1)

André CRP
André CRP

Reputation: 11

http://imacros.net/best-practices-of-using-imacros-for-test-automation

1 Handling Dynamic IDs Use Wildcards If you replace the numbers of the ID with the * wildcard, the macro will be successfully executed in every browser session.

Upvotes: 1

Related Questions