I am new to Selenium and got stuck with the following problem.
I want to open this web site, fill out the form, click on Submit button and collect the value of Distance field in the response page.
This is my current code. I can fill out the form and click on Submit button. However, I don't know how to collect Distance value from the response page and save it in the list. I will need to execute this code in the loop. Therefore each response should be saved in a list.
Also I don't want to physically simulate the opening of a browser. Instead I want this process running in a background.
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("https://www.flightmanager.com/content/timedistanceform.aspx")
departure_airport = browser.find_element_by_id("ContentPlaceHolder1_txtDepartureICAO")
arrival_airport = browser.find_element_by_id("ContentPlaceHolder1_txtArrivalICAO")
submit = browser.find_element_by_id("ContentPlaceHolder1_BtnSubmit")
departure_airport.send_keys("LEMD")
arrival_airport.send_keys("LEBL")
submit.click()
wait = WebDriverWait( browser, 5 )