0

I am loading a webpage which has lots of flash/gif elements embedded within object tags. I can see those elements in my browser, but I cannot reach them in HtmlUnit.

page.getByXPath("//object"); //gives empty result

waitForBackgroundJavaScript() doesn't help either.

Anyone had the same problem before? Thanks!!

xiaolong
  • 3,396
  • 4
  • 31
  • 46
  • Are those elements added to the DOM by JS or are they returned in the RAW HTML of the HTTP response? – Mosty Mostacho May 14 '14 at 20:22
  • @MostyMostacho thanks for replying. It's loaded by JS, but waiting for JS didn't help. Any insights? – xiaolong May 15 '14 at 16:18
  • I've added an explanation on how to wait for JS in this [question](http://stackoverflow.com/questions/17843521). Maybe it helps. Anyway, if you have issues in the JS code itself (eg: getting javascript exceptions) then this other [question](http://stackoverflow.com/questions/20315330) might help. – Mosty Mostacho May 15 '14 at 17:25

0 Answers0