title: Selenium Python Check if dropdown is selected with the expected value. I am getting False
body: <p>I have a method to check if the drop down field has the selected value.
  The value selected in the drop down in the GUI is "PAF".<br>
  I am using first_selected_option from the Select class which should check the selected value from the drop down field.
  I use an If Then Else to check if the value from the drop down matches the expected value of "PAF"
  I am getting False instead of True.</p>
  
  <p>Here is my Selenium Webdriver Python code snippet:</p>
  
  <pre><code>def is_dropdown_selected_from_advanced_cleaning_output_tab(self, field):
      selected_dropdown_option = Select(self.get_element(*MainPageLocators.mappings_paf_output_dropdown)).first_selected_option
      print (str(selected_dropdown_option))
      if (str(selected_dropdown_option)) == field:
          return True
      else:
          return False
  </code></pre>
  
  <p>from my TestCase class the call to the method:</p>
  
  <pre><code>self.assertTrue(mappings.is_dropdown_selected_from_advanced_cleaning_output_tab("PAF"))
  </code></pre>
  
  <p>In the GUI PAF is selected in the drop down.  Why is it returning false?  What is wrong with my code?</p>
  
  <p>I think I am not getting the string value correctly into the variable selected_dropdown_option
  I tried (str(selected_dropdown_option))  Is this not the correct way to get the string value?</p>
  
  <p>Thanks,
  Riaz</p>