<div class="category well clearfix well-1">
<div class="row">
<div role="tabpanel" class="col-md-8 form-group" id="tooltip-hide">
<div class="input-group">
<span class="input-group-addon">
<label style="margin:0px;padding:0px;">Dates</label>
</span>
<input required="" type="text" name="report_range" id="repDateRange" placeholder="Select date range" class="form-control input-sm required" value="" readonly="" style="cursor:text; background:#fff;">
</div>
<div id="dateRangeError"></div>
</div>
<input type="hidden" name="date_range_type" value="">
<input type="hidden" name="start_date" value="">
<input type="hidden" name="end_date" value="">
</div>
</div>
Using all the locators including absolute Xpath, I am unable to click on date text box. I have also tried using TABS, javascript click and Actions.
2
Answers
The issue you are facing is because the window (pop-up) you are trying to acess isn’t handled as the same of the basic webpage, in short selenium can’t see it because it’s counted as an Add-on.
you can try the following:
This method gets the instance of the pop-up window.
driver.window_handles[1]
:This method switches to the given pop-up window.
driver.switch_to.window(handle):
Are you sure your element locator doesn’t return something unexpected like a different type or a List[]?