0

In versions lower than 2.52 with (java 1.7), selenium-java comes integrated with the same and I had to simply add selenium lib jars containing htmlunit driver to the build path. Now on google search I found the latest htmlunit driver version is 2.9 and downloaded the jar and added it to the build path. Still it doesn't work.

It says: "The type org.openqa.selenium.HasInputDevices cannot be resolved. It is indirectly referenced from required .class files Configure build path". Anything extra I should do to get it work? It is for headless automated tests.

How to solve this issue, pls help.

a4aravind
  • 1,202
  • 1
  • 14
  • 25
  • 1
    Check this discussion [Unable to launch HtmlUnitdriver through Selenium 3.4.0](https://stackoverflow.com/questions/50273474/unable-to-launch-htmlunitdriver-through-selenium-3-4-0/50274121#50274121) – undetected Selenium Jun 06 '18 at 09:53
  • Thanks but it's not working out for me, tried with the same code-block from that page as well. Any external jars to add ? – a4aravind Jun 06 '18 at 11:01
  • Factually it would be impossible to answer your question until and unless you edit/update the question with the _Binary version information_, _code trials_ and error stack trace – undetected Selenium Jun 06 '18 at 11:03
  • Ok, I will do that soon, now for me to continue I just downgraded to selenium 2.52 and java 1.7 and that worked – a4aravind Jun 06 '18 at 11:33
  • 1
    Downgrading is not a solution. Rather than pulling a rug over the real time issues by downgrading, raise those issues to get em fixed. – undetected Selenium Jun 06 '18 at 11:35
  • Thanks a lot. I got it working by referring the suitable versions of the dependancies especially the htmlunitdriver mentioned here https://www.seleniumhq.org/download/ .Earlier I went after the latest htmlunitdriver version 2.9 which was preventing me in getting started. – a4aravind Jun 07 '18 at 04:41
  • So, my current config is java 1.8, selenium 3.12 and htmlunitdriver(which doesn't come along with selenium webdriver now) 2.31 – a4aravind Jun 07 '18 at 04:43

1 Answers1

0

It is just a mismatch of the versions of required dependancies which is clearly mentioned here . So, right now everything works fine with selenium webdriver 3.12, java 1.8 and htmlunitdriver 2.31

a4aravind
  • 1,202
  • 1
  • 14
  • 25