1

I'm trying to click on a javascript button in this site(its the search button on the left): http://www.amadeusepower.com/trek/portals/trek/default.aspx?Culture=en-US

I couldn't find a way to click on it using htmlunit. Now I am thinking of switching to selenium but there is a problem. My application should fill the forms and get the results from the site and parse them to get some data from the results page and send it to an android device. It will need to run one instance for each android device connected to it so if I use selenium it probably will pop up a new window for each user and that may complicate things. I want to use a headless browser but as I said htmlunit has an issue which I asked in here How to click on a javascript button in htmlunit

Does anyone know a way to run selenium as a headless browser on windows or can you suggest another tool I can use in eclipse in windows for this purpose?

Community
  • 1
  • 1
ManahManah
  • 263
  • 2
  • 5
  • 17

1 Answers1

2

You can use phantomjs. It is a complete webkit based headless browser that has builtin webdriver support.

luksch
  • 11,497
  • 6
  • 38
  • 53
  • can phantomjs be used in eclipse the same way as htmlunit or selenium? I don't want to switch to some other IDE. if it can be used that way, can you recommend a tutorial for configuring and using it? – ManahManah May 19 '13 at 18:31
  • yes, I use phantomjs through selenium webdriver with its java bindings in eclipse. selenium webdriver comes bundled with all needed stuff. you just need to download and install phantomjs and give selenium webdriver the path. you can read about the setup here: http://docs.seleniumhq.org/docs/03_webdriver.jsp#introducing-webdriver – luksch May 19 '13 at 19:35
  • You can also use HtmlUnitDriver. I am not sure what the difference is though, in capability, between PhantomJS. http://stackoverflow.com/questions/28008825/htmlunitdriver-htmlunit-vs-ghostdriver-phantomjs – djangofan Feb 14 '15 at 15:48