Reputation: 117
I try to do Selenium tests on a GWT Java app and I want to use the ChromeDriver to do so.
I need the GWT Plugin in my setting so, here's what I do :
@Provides
@Singleton
protected WebDriver getDefaultWebDriver() throws IOException {
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--load-plugin=/home/bob/.config/google-chrome/Default/Extensions/jpjpnpmbddbjkfaccnmhnkdgjideieim/1.0.11357_0/Linux_x86_64-gcc3/libGwtDevPlugin.so");
ChromeDriver chromeDriver = new ChromeDriver(chromeOptions);
return chromeDriver;
}
I'm on Ubuntu and I found the path to my plugin by looking in chrome://plugins
However, when I run my test, the plugin isn't loaded and he asks me to install it (which fails my test).
Any idea of what can cause that and how can I make it know about the plugin?
Upvotes: 1
Views: 423
Reputation: 84
Indeed for test development purposes it is convenient to be able to test against dev mode.
You might want to have a look here: http://c.gwt-examples.com/home/testing/selenium-testing.
Upvotes: 1
Reputation: 9537
GWT Dev Plugin is only for GWT Development Mode and not for gwt applications in production mode i.e hosted in web server. In other words, once you compile the project and deploy into web server like tomcat you do not need the GWT Dev Plugin anymore.
Selenium should be used to test the deployed application in web server (like tomcat). There is no need for you to load gwt dev plugin!!!!!
Upvotes: 0