Skip to content

Instantly share code, notes, and snippets.

@AlexVPopov
Last active December 20, 2016 15:16
Show Gist options
  • Save AlexVPopov/9ceba87d01836c72cbfe52f389b7809c to your computer and use it in GitHub Desktop.
Save AlexVPopov/9ceba87d01836c72cbfe52f389b7809c to your computer and use it in GitHub Desktop.
def read_price(selector)
elmenent = $driver.find_element(id: selector)
rescue Selenium::WebDriver::Error::NoSuchElementError
"Euer Return-wert"
else
return elmenent.attribute("value").to_s if elmenent == "NUM_HR_VSU"
elmenent.text().gsub(' €', '').gsub(',', '.')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment