I know question is quite simple for you people to answer but, I got stuck at a drop list from where i wanted to select the birth Month.
I have been working on other websites but unfortunately could'nt get this to work.
I tried:
Click using different locators. Using Action class to mover hover and clicking. Using Java Script to select the month.
Strange thing is if I get the text of the WebElement i am able to do so, but not able to click on it.
url of the Application is : a link!
This is when creating the account on google.
I was trying to select the Month from the list any month.
I have got TimeOutException when i wait until the box has the desired month.
Apart from that I dont get any error. The script always passes without making the selection.
I know the question is quite easy, but if anyone can help me get through it.
Thanks in advance.
<span id="BirthMonth" class=" form-error" aria-invalid="true">
<div class="goog-inline-block goog-flat-menu-button jfk-select" role="listbox" style="-moz-user-select: none;" aria-expanded="false" tabindex="0" aria-haspopup="true" aria-activedescendant=":0" title="Birthday">
<div class="goog-menu goog-menu-vertical" style="-moz-user-select: none; visibility: visible; left: 0px; top: -82.2333px; display: none;" role="listbox" aria-haspopup="true">
<div id=":1" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":2" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div class="goog-menuitem-content">February</div>
</div>
<div id=":3" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":4" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":5" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":6" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":7" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":8" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":9" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":a" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":b" class="goog-menuitem" role="option" style="-moz-user-select: none;">
<div id=":c" class="goog-menuitem" role="option" style="-moz-user-select: none;">
</div>
<input id="HiddenBirthMonth" type="hidden" name="BirthMonth">
</span>
did you tried with sendkey? i hope by using sendkey it will work
driver.findElement(By.xpath(".//*[@id='BirthMonth']/div[1]")).sendKeys("april");
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With