My project is using Selenium-Client-Driver 0.9 and Selenium-based integration testing Maven-Selenium-plugin. (Stackhouse Flow already has many questions but no response to a revolver was found). Selenium test case fails due to error: org.openqa.selenium.server.browserlaunchers.firefoxChromeLauncher $ FileLockRemainedException: lock file still exists! C: \ Users \ nagappan.s \ AppData \ Local \ Temp \ customProfileDir23d2b92949d74270915586b2a3f2073a \ parent.lock at org.openqa.selenium.server.browserlaunchers.firefoxChromeLauncher.waitForLifeToGoAway (FirefoxChromeLauncher.java318) at org.openqa.selenium.server. Browser Launcher Firefox Chrome Lerner. WhiteForFototBrequired (Firefox Chrome Lerner. Java 365) ... 20 more
I got the answer myself. The Maven Selenium Plugin just launches the hub and does not start the selenium node (both integrated and standalone). In my case, this is an older version of Selenium 0.9 and the unit testing uses the default selenium, so it requires a node processing browser command by opening the browser and console. That's why I created the server and hub like
& lt; Plugin & gt; To start, start the hub and node using the Maven Entry plugin. & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-antrun-plugin & lt; / ArtifactId> & Lt; Version & gt; 1.7 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; Step & gt; Pre-integration test & lt; / Step & gt; & Lt; Configuration & gt; & Lt; Goal & gt; & Lt; Property name = "selenium server.dir" value = "$ {baseir}" /> & Lt; Path id = "selenium.classpath" & gt; & Lt; Fileset dir = "$ {Selenium. Server.dir}" & gt; & Lt; Include name = "Selenium * .jar" /> & Lt; / Fileset & gt; & Lt; / Path & gt; & Lt; Java classname = "org.openqa.grid.selenium.gridLauncher" classpathref = "selenium.classpath" failure = "true" fork = "false" & gt; & Lt; Arg line = "- role hub" /> & Lt; / Java & gt; & Lt; Java classname = "org.openqa.grid.selenium.gridLauncher" classpathref = "selenium.classpath" failure = "true" fork = "false" & gt; & Lt; Arg line = "- role node -hub http: // local host: 4444 / grid / registration" /> & Lt; / Java & gt; & Lt; / Target & gt; & Lt; / Configuration & gt; & Lt; Goals & gt; & Lt; Goal & gt; Run & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt;
It now works perfectly.
No comments:
Post a Comment