Click here to Skip to main content
15,039,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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?

What I have tried:

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();
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900