1

Here is a part of my Orbitz.com automated test where I search for flights and want to use Jsoup to parse the prices and work with them. Even before I actually start parsing html, I get "HTTP error fetching URL. Status=429" exception. I've read all I could about it. All I found is that I have to wait before getting the url in order to avoid exceeding the requests limitation. I added Thread.sleep(); but Jsoup cannot get a page anyway. I am sure that I miss something obvious, but have no idea what.

 WebDriver wd = new ChromeDriver();   
 ..........
 ..........
 wd.findElement(By.xpath("//form[@id='gcw-flights-form-hp- 
 flight']//button[@type='submit']")).click();
 String url = wd.getCurrentUrl();
 Thread.sleep(1000);
 Document doc = Jsoup.connect(url).get();

0 Answers0