Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select(self.driver.find_element_by_id("currencyid")).select_by_visible_text("AUD")
- Select(self.driver.find_element_by_id("excur")).select_by_visible_text("AUD")
- select1 = Select(self.driver.find_element_by_id("currencyid")).first_selected_option.text
- select2 = Select(self.driver.find_element_by_id("excur")).first_selected_option.text
- assert select1 == "USD"
- assert select2 == "CAD"
- currency = Select(self.driver.find_element_by_id("currencyid"))
- excur = Select(self.driver.find_element_by_id("excur"))
- currency.select_by_visible_text("AUD")
- excur.select_by_visible_text("AUD")
- assert currency.first_selected_option.text == "USD" # should not be "AUD"?
- assert excur.first_selected_option.text == "CAD" # should not be "AUD"?
- values = [("currencyid", "AUD"), ("excur", "AUD")]
- for id, value in values:
- select = Select(self.driver.find_element_by_id(id))
- select.select_by_visible_text(value)
- assert select.first_selected_option.text == value
Add Comment
Please, Sign In to add comment