-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select option without value #299
Comments
No answer? Also need help with this. |
Doesn't this work? horseman.select('#main_road', 'A') // Select first option |
Could not succeed. Can i select by index? |
No you cannot select by index. It is weird to me that the horseman.evaluate(function() {
// Select first option
$('#main_road :nth-child(1)').prop('selected', true);
}); |
First of all thank you for your help. I tried your code and it should work, but i realised that not in my case, in website i'm crawling i think where is onclick event when selecting (That is why there is no value in option). So i should simulate click on option. Any chance to do this? |
You should be able to just click on it then. horseman.click('#main_road :nth-child(1)') |
Didn't work. Should i open/click Select element before click? |
How to select an option without value?
For example:
HTML:
The text was updated successfully, but these errors were encountered: