Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

How to get dynamic IDs of a webpage?

sridatta_spsridatta_sp Members
edited July 2014 in Sahi - Open Source
We have a usecase where creation of a newly object gets dynamic id and we have to pass that id in drag and drop feature, so how do we do it?

Example:
Create a object 'abc' ; its id is shown as _div("dynamic")
Create same object by name 'def' ; its id is shown as _div("dynamic[1]");
Continue same now id is shown for third object as _div("dynamic[2]");

Now how to capture this id as shown in above example, please help

Answers

  • You can do it by regular expression something like
    _setStrictVisibility(true)
    _div("/dynamic/");//drag the div
    _setStrictVisibility(false)
    StrictVisibility should be set to true to ensure that the elements availible in the current screen are only being used to perform the actions specified
Sign In or Register to comment.