Skip to main content
Bumped by Community user
Bumped by Community user

Hello, I have the following select: I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying: I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Am I missing something? When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Am I missing something?

Hello, I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Am I missing something?

I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Am I missing something?

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 13 characters in body
Source Link
IAmMilinPatel
  • 7.8k
  • 7
  • 43
  • 68

Hello, I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Any ideiaAm I missing something?

Hello, I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Any ideia?

Hello, I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Am I missing something?

Source Link
Rafael C.
  • 231
  • 1
  • 8

webdriver.support.select - Select doesn't interact with the element

Hello, I have the following select:

<div class="col-xs-12 col-md-6">
<label class="ph_label pointer city">
<span class="l citylbl">City</span>
<select class="cities custom-dropdown" data-validation-error-msg="You  must select a city" required="" name="city" disabled="disabled" data-validation="required">
<option value="">City</option>
<option value="Shanghai">Shanghai</option>
<option value="Beijing">Beijing</option>
<ul class="cities custom-dropdown" data-target-selector="select.cities" style="width: 293px;">
</label>
</div>

I'm trying:

mySelect = Select(self.driver.find_element_by_name("city"))
mySelect.select_by_value("Shanghai")

When I see the test run, selenium goes through this element as if everything was OK, but in fact the city was not selected. Any ideia?