Not able to select value from Dropdown | Selenium Forum
M
Posted on 05/09/2015
Below is the div for same:

div class="pac-container" style="display: none; width: 0px; position: absolute; left: 0px; top: 100px;">
<div class="pac-item">
<span class="pac-icon pac-icon-marker"/>
<span class="pac-item-query">
<span class="pac-matched">Delhi</span>
</span>
<span/>
</div>
<div class="pac-item">
<span class="pac-icon pac-icon-marker"/>
<span class="pac-item-query">
<span class="pac-matched">Delhi</span>
Technological University
</span>
<span>New Delhi, Delhi</span>
</div>
<div class="pac-item">
<span class="pac-icon pac-icon-marker"/>
<span class="pac-item-query">
<span class="pac-matched">Delhi</span>
School of Professional Studies and Research
</span>
<span>New Delhi, Delhi</span>
</div>
<div class="pac-item">
<span class="pac-icon pac-icon-marker"/>
<span class="pac-item-query">
<span class="pac-matched">Delhi</span>
School of Business
</span>
<span>New Delhi, Delhi</span>
</div>
<div class="pac-item">
<span class="pac-icon pac-icon-marker"/>
<span class="pac-item-query">
<span class="pac-matched">Delhi</span>
Agra Tajmahal Tour
</span>
<span>Bhagawan Mahavir Marg, Rohini, New Delhi, Delhi</span>
</div>
</div>

For more detail go to site:www.tripda.in and enter value del in dropdown..
I want to select first value every time but enable to make dynamic xpath which works every time.

Tried all 3 options of dropdown selection but no luck :(

Please help if any one able to find out..

Thanks in advance
Mohit

M
Replied on 08/09/2015

hi can you upload the java file. I'll take a look at it.


M
Replied on 11/09/2015

Its not a select tag. You cannot use sendkeys
Can you send me screenshot of Page with firbug