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="https://10.204.137.86:5111/prweb/PRWebLDAP3/SstGGrXNazw%5B*/webwb/zblankimage.gif" alt="" class="pzbtn-i"> Create Individual CID <img alt="" src="https://10.204.137.86:5111/prweb/PRWebLDAP3/SstGGrXNazw%5B*/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( ExpectedConditions.visibilityOfElementLocated(By.css(XXX) ));
You can find more about Expected Conditions here.