How locate dynamic text field element inside dialog box?

  • I tried to using absolute xpath to locate the dynamic text field element after search but it fails.

    <div class="pzbtn-rgt" data-click="...">
    <div class="pzbtn-mid" data-click="....">
    <img src="*/webwb/zblankimage.gif" alt="" class="pzbtn-i">
    Create Individual CID
    <img alt="" src="*/webwb/zblankimage.gif" class="pzbtn-i">

    The Create individual CID is the one with dynamic action. I tried with many ways but still doesn't works. Please help. Thanks.

  • As Upkar mentioned, we cannot determine exactly the problem. But most probably you will need to include an explicit wait for a condition where your test can proceed.

    new WebDriverWait(10 /*seconds*/).until(

    You can find more about Expected Conditions here.

Suggested Topics