I'm using Selenium with Mink to automatically register in a number of our websites.
To do that you have to select your birth date from three select inputs. I just use select-option with the xpath of the select field and the value of the option I want.
It works fine in Firefox and Chrome but in Safari, with some of the pages it works and with others nothing happens. There's no exception or anything, it just doesn't do anything with the select fields and then the rest of the test fails because the registration didn't work.
The CSS of the select fields is like this:
<select name="Signup:Birthday[day]" size="1" class=" date_day" id="Birthday">
<option value="" selected="selected">---</option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
.......
</select>
I am using xpath //*[@id="Birthday"] and option 3 but in Safari it just does nothing.
public function selectState($option, $name) {
$page = $this->getSession()->getPage();
$selectElement = $page->find('xpath', '//*[@id="Birthday"]');
$selectElement->selectOption($option);
}
Any ideas?
I am using xpath //*[@id="Birthday"] and option "3".. How do you use that? Share your code