Realice una serie de scripts usando Selenium IDE, el detalle es que al momento de pasar dichos scripts al lenguaje de Java para que sean ejecutados por este medio y no por el IDE de Selenium me genera un error al momento de invocar la conexión con el navegador de Firefox, este es el código que estoy utilizando para poder hacer dicho llamado:
Código:
Y este es el log que me muestra NetBeans 8.2 como error cuando ejecuto el proceso@Before public void setUp() throws Exception { driver = new FirefoxDriver(); baseUrl = "http://10.36.50.145:12080/bep/views/login.jsp"; System.out.println(".....paso 1....."); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); }
Código:
¿Cómo puedo corregir este error? JPDA Listening Start... JPDA Address: TNPGPWX2PNL382:57551 Port:57551 cd C:\Users\d.apolinar.hernandez\Documents\NetBeansProjects\Selenium_BEP; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_111" "M2_HOME=C:\\Program Files\\Apache Software Foundation\\apache-maven-3.3.9" cmd /c "\"\"C:\\Program Files\\Apache Software Foundation\\apache-maven-3.3.9\\bin\\mvn.cmd\" -Dexec.args=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=57551 -classpath %classpath com.accenture.posadas.bep.main.Bep_Main\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_111\\bin\\java.exe\" -Dexec.classpathScope=test -Djpda.listen=true -Djpda.address=57551 -Dmaven.ext.class.path=\"C:\\Program Files (x86)\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec\"" Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts. Scanning for projects... ------------------------------------------------------------------------ Building Selenium_BEP 1.0-SNAPSHOT ------------------------------------------------------------------------ --- exec-maven-plugin:1.2.1:exec (default-cli) @ Selenium_BEP --- org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: [email protected]","e":true,"v":"1.7","st":1485813818746},"[email protected]":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\[email protected]","e":true,"v":"1.0.5","st":1485813818746},"[email protected]":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\[email protected]","e":true,"v":"1.0","st":1485813818731}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","e":true,"v":"51.0.1","st":1485813818762}}} 1486071896334 addons.xpi DEBUG No changes found 1486071896345 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896347 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896352 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0 1486071896353 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896354 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896357 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.7 1486071896358 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896358 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896364 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0.5 1486071896376 addons.xpi-utils DEBUG Starting async load of XPI database C:\Users\DAPOLI~1.HER\AppData\Local\Temp\anonymous5524029309551114414webdriver-profile\extensions.json 1486071896377 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896378 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\[email protected] 1486071896380 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0 1486071896382 addons.manager DEBUG Registering shutdown blocker for XPIProvider 1486071896382 addons.manager DEBUG Provider finished startup: XPIProvider 1486071896382 addons.manager DEBUG Starting provider: LightweightThemeManager 1486071896382 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager 1486071896382 addons.manager DEBUG Provider finished startup: LightweightThemeManager 1486071896383 addons.manager DEBUG Starting provider: GMPProvider 1486071896410 addons.manager DEBUG Registering shutdown blocker for GMPProvider 1486071896410 addons.manager DEBUG Provider finished startup: GMPProvider 1486071896410 addons.manager DEBUG Starting provider: PluginProvider 1486071896410 addons.manager DEBUG Registering shutdown blocker for PluginProvider 1486071896411 addons.manager DEBUG Provider finished startup: PluginProvider 1486071896411 addons.manager DEBUG Completed startup sequence 1486071896849 addons.xpi-utils DEBUG Async JSON file read took 0 MS 1486071896849 addons.xpi-utils DEBUG Finished async read of XPI database, parsing... 1486071896852 addons.xpi-utils DEBUG Successfully read XPI database 1486071896866 addons.manager DEBUG Starting provider: <unnamed-provider> 1486071896866 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider> 1486071896866 addons.manager DEBUG Provider finished startup: <unnamed-provider> *** Blocklist::_loadBlocklistFromFile: blocklist is disabled 1486071897020 addons.manager DEBUG Starting provider: PreviousExperimentProvider 1486071897020 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider 1486071897021 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118) at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95) at com.accenture.posadas.bep.utils.Usuario_Correcto.setUp(Usuario_Correcto.java:25) at com.accenture.posadas.bep.main.Bep_Main.main(Bep_Main.java:22) feb 02, 2017 3:45:42 PM org.openqa.selenium.os.UnixProcess$SeleniumWatchDog destroyHarder INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@30af5b6b Error en Login ------------------------------------------------------------------------ BUILD SUCCESS ------------------------------------------------------------------------ Total time: 01:22 min Finished at: 2017-02-02T15:45:47-06:00 Final Memory: 10M/309M ------------------------------------------------------------------------