I know that driver.getPageSource()
gets you the web page as Html but the issue I am having is that the site I am testing puts data in brackets like {{OriginDescription}}
, maybe using some js framework to get the data? Anyway I can view the data when I inspect the element in browser but viewing the page source in browser also shows only the brackets and not the data. So how do I get the webpage as it is when I am viewing (inspect) it in the browser?
Below is the website I am testing to be exact:
driver.get("https://www.united.com/ual/en/US/flight-search/book-a-flight/results/rev?f=Miami,+FL,+US+(MIA+-+All+Airports)&t=IAH&d=2020-05-02&r=2020-05-16&sc=7,7&px=1&taxng=1&newHP=True&idx=1"); String pageSource = driver.getPageSource();
I am using java and chromedriver.