Perl selenium remote driver cannot create a new instance - perl

My perl script couldn't connect to the selenium standalone server running in localhost port 4444. In different environment different things happen.
Windows 7 : The script works sometimes and sometimes it doesnt.
Selenium server side : starts properly. but there is no new session created when I create remote driver instance.
C:\Users\ganess4\msant\nsn_testeng\tools\AutoBuildPromotionEmail>java -jar selenium-server-standalone-2.37.0.jar
Dec 3, 2013 12:16:43 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
12:16:43.882 INFO - Java: Sun Microsystems Inc. 20.14-b01
12:16:43.882 INFO - OS: Windows 7 6.1 x86
12:16:43.894 INFO - v2.37.0, with Core v2.37.0. Built from revision a7c61cb
12:16:43.953 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPhone, version=}] does not match with current platform: VISTA
12:16:43.973 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPad, version=}] does not match with current platform: VISTA
12:16:44.020 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
12:16:44.021 INFO - Version Jetty/5.1.x
12:16:44.022 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
12:16:44.023 INFO - Started HttpContext[/selenium-server,/selenium-server]
12:16:44.024 INFO - Started HttpContext[/,/]
12:16:44.074 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#1754ad
2
12:16:44.074 INFO - Started HttpContext[/wd,/wd]
12:16:44.112 INFO - Started SocketListener on 0.0.0.0:4444
12:16:44.112 INFO - Started org.openqa.jetty.jetty.Server#c1b531
Code Side: Note I did try port 4444 and other variations.
my $browser = "firefox";
my $platform = "WINDOWS";
eval
{
$self->{seldriverarray} = new Selenium::Remote::Driver(browser_name => $browser, platform => $platform);
$self->{seldriverarray}->debug_on;
print Dumper $self->{seldriverarray}->status;
};
Throws the following
Use of uninitialized value in string ne at C:/Dwimperl/perl/site/lib/Selenium/Re
mote/RemoteConnection.pm line 30, <FH> line 48.
Use of uninitialized value in string eq at C:/Dwimperl/perl/site/lib/Selenium/Re
mote/RemoteConnection.pm line 35, <FH> line 48.
Selenium server did not return proper status at C:/Dwimperl/perl/site/lib/Seleni
um/Remote/Driver.pm line 232.
The weirdest thing happens when I run it in another environment
Suse Enterprise Edition:
Selenium server side: see it creates a new session, which implies that the code is not wrong. So, what is stopping the code to launch a new session in windows? I couldnt run the script in linux, because it is timing out for a long time struggling to launch the firefox.
12:32:09.969 INFO - Started org.openqa.jetty.jetty.Server#181edf4
12:32:19.041 INFO - Executing: [new session: {platform=WINDOWS, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, version=}] at URL: /session)
12:32:19.057 INFO - Creating a new session for Capabilities [{platform=WINDOWS, javascriptEnabled=true, acceptSslCerts=true, browserName=firefox, version=}]

After updating the Net::HTTPS and the IO::Socket::SSL, this got resolved.

Related

rundeck :how to correct the configuration of rundeck to access via the browser

i have problem accessing rundeck
[2021-05-03T17:33:33,231] WARN beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'exceptionMappings' being accessed! Ambiguous write methods found next to actually used [public void grails.plugin.springsecurity.web.authentication.AjaxAwareAuthenticationFailureHandler.setExceptionMappings(java.util.List)]: [public void org.springframework.security.web.authentication.ExceptionMappingAuthenticationFailureHandler.setExceptionMappings(java.util.Map)]
[2021-05-03T17:33:41,756] INFO rundeckapp.BootStrap - Starting Rundeck 3.3.10-20210301 (2021-03-02) ...
[2021-05-03T17:33:41,757] INFO rundeckapp.BootStrap - using rdeck.base config property: /var/lib/rundeck
[2021-05-03T17:33:41,768] INFO rundeckapp.BootStrap - loaded configuration: /etc/rundeck/framework.properties
[2021-05-03T17:33:41,805] INFO rundeckapp.BootStrap - RSS feeds disabled
[2021-05-03T17:33:41,806] INFO rundeckapp.BootStrap - Using jaas authentication
[2021-05-03T17:33:41,811] INFO rundeckapp.BootStrap - Preauthentication is disabled
[2021-05-03T17:33:41,918] INFO rundeckapp.BootStrap - Rundeck is ACTIVE: executions can be run.
[2021-05-03T17:33:42,283] WARN rundeckapp.BootStrap - [Development Mode] Usage of H2 database is recommended only for development and testing
[2021-05-03T17:33:42,590] INFO rundeckapp.BootStrap - Rundeck startup finished in 945ms
[2021-05-03T17:33:42,877] INFO rundeckapp.Application - Started Application in 32.801 seconds (JVM running for 35.608)
Grails application running at http://xxx.xxx.xxx.xxx:4440 in environment: production
Session terminated, killing shell...[2021-05-04T10:20:46,596] INFO rundeckapp.BootStrap - Rundeck Shutdown detected
...killed.
can you help me please
by the way I have installed a vm under redhat
then I installed rundeck RPM
and from my physical machine when I do http: // rundecknode_ip: 4440
it returns me on the browser error 113 no route to host and on examination of the logs I have what I have posted above
when i do systemctl status rundeck it is active running

STS-3.8 WebSphere Application Sever Not Fully Starting

Issue: WAS app server v7 does not start in Spring STS. It gets to 100% and just continues to say "launching delegate" and in the system.out file has the standard "open for business" but the server itself in STS never gets to a "Started" status state.
Platform: STS-3.8, Always tried on eclipse neon.
Plugin: IBM WebSphere Application Server Traditional V7.X Developer Tools for Neon
WAS Profile: Created a new profile through the profile management tool for WAS.
Server Config:
- Default
Changes Applied:
- Delete contents of /logs, /temp, /tranlog, /wstemp after my first attempt. Just to clear out the folders. No change in behavior.
Server Start Up Log
************ Start Display Current Environment ************
Host Operating System is Windows 7, version 6.1 build 7601 Service Pack 1
Java version = JRE 1.6.0 IBM J9 2.4 Windows 7 amd64-64 jvmwa6460sr10fp1-20120202_101568 (JIT enabled, AOT enabled)
J9VM - 20120202_101568
JIT - r9_20111107_21307ifx1
GC - 20120202_AA, Java Compiler = j9jit24, Java VM name = IBM J9 VM
**was.install.root** = C:\IBM\runtimes\base_v7
user.install.root = C:\00_IBM_RAD_PROFILES\stsProfileWAS
Java Home = C:\IBM\runtimes\base_v7\java\jre
ws.ext.dirs = C:\\IBM\\runtimes\\base_v7\\java\\lib;C:\\IBM\\runtimes\\base_v7\\classes;C:\\IBM\\runtimes\\base_v7\\lib;C:\\IBM\\runtimes\\base_v7\\installedChannels;C:\\IBM\\runtimes\\base_v7\\lib\\ext;C:\\IBM\\runtimes\\base_v7\\web\\help;C:\\IBM\\runtimes\\base_v7\\deploytool\\itp\\plugins\\com.ibm.etools.ejbdeploy\\runtime
Current trace specification = *=info:com.ibm.*=all
************* End Display Current Environment *************
[06/07/16 10:36:29:575 ADT] 00000000 ManagerAdmin I TRAS0017I: The startup trace state is *=info:com.ibm.*=all.
[06/07/16 10:36:29:583 ADT] 00000000 WsServerContr 1 Executing executeUtilityOnWindows with args: C:\00_IBM_RAD_PROFILES\stsProfileWAS\config PC123Node20Cell PC123Node20 server1 -script C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\quickServerStart.bat
[06/07/16 10:36:29:583 ADT] 00000000 ManagerAdmin I TRAS0018I: The trace state has changed. The new trace state is *=info.
[06/07/16 10:36:29:742 ADT] 00000000 AdminTool A ADMU0128I: Starting tool with the stsProfileWAS profile
[06/07/16 10:36:29:744 ADT] 00000000 AdminTool A ADMU3100I: Reading configuration for server: server1
[06/07/16 10:36:29:827 ADT] 00000000 AdminTool A ADMU3300I: Launch script for server created: C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\quickServerStart.bat

I'm trying to make a website but server won't start

I'm trying to make a website and when I start the use the command rails s it says this:
<code>
$ rails s
=> Booting WEBrick
=> Rails 4.2.5.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-04-15 15:19:20] INFO WEBrick 1.3.1
[2016-04-15 15:19:20] INFO ruby 2.2.4 (2015-12-16) [i386-mingw32]
[2016-04-15 15:19:20] INFO WEBrick::HTTPServer#start: pid=5892 port=3000
</code>
It doesn't go past that it just gets stuck on that i've port fowarded 3000 and added it to the firewalls exceptions list and still no go it works on my dads connection but not on mine.
These are the commands I use prior to entering rails:
s , rails new instagram_app , cd_instagramapp.
After run command "rails s". Just open a browser window and navigate to http://localhost:3000
Reference: http://guides.rubyonrails.org/getting_started.html#starting-up-the-web-server

Selenium looping through jenkins and permission denied in cli

After struggling to get proper testsuites, I'm now pretty disappointed by the fact that , while following as close as possible this tutorial (pretty straightforward, right ?) Setting up Selenium server on a headless Jenkins CI build machine, Jenkins keeps looping on the current build, outputting :
So I decided to run a selenium build by hand on the ci machine, and got this :
user#machine:/var/log$ export DISPLAY=":99" && java -jar /var/lib/selenium/selenium- server.jar -browserSessionReuse -htmlSuite *firefox http://staging.site.com /var/lib/jenkins/jobs/project/workspace/tests/selenium/testsuite.html /var/lib/jenkins/jobs/project/workspace/logs/selenium.html
24 janv. 2012 19:27:56 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
19:27:59.927 INFO - Java: Sun Microsystems Inc. 20.0-b11
19:27:59.929 INFO - OS: Linux 3.0.0-14-generic amd64
19:27:59.951 INFO - v2.17.0, with Core v2.17.0. Built from revision 15540
19:27:59.958 INFO - Will recycle browser sessions when possible.
19:28:00.143 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
19:28:00.144 INFO - Version Jetty/5.1.x
19:28:00.145 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
19:28:00.147 INFO - Started HttpContext[/selenium-server,/selenium-server]
19:28:00.147 INFO - Started HttpContext[/,/]
19:28:00.183 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#16ba8602
19:28:00.184 INFO - Started HttpContext[/wd,/wd]
19:28:00.199 INFO - Started SocketListener on 0.0.0.0:4444
19:28:00.199 INFO - Started org.openqa.jetty.jetty.Server#6f7a29a1
HTML suite exception seen:
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:900)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:603)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:287)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:54)
19:28:00.218 INFO - Shutting down...
19:28:00.220 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]
While understanding the output is'nt that hard, finding what to do to remove this issue is.
Any chance you guys already have been facing that kind of stuff ? Thanks
I only just got past these problems myself, but I was able to run your command when I pointed it at my .jar, testSuite and report file. I'm thinking that perhaps the location of your files under,
/var/lib/selenium
could be part of the problem. Try putting them where your user has permission perhaps under
/home/USERNAME/selenium
Other than that the only thing I can say is make sure your .jar, testSuite and report file are valid.
Also (I assume this is an error of copy and paste into stack overflow) but, this part of your command is incorrect
/var/lib/selenium/selenium- server.jar
You are not getting the error I would expect from an incorrect jar location so I assume something was lost when you pasted to stackoverflow.

Selenium RC launches Firefox5 and IE8 browser but does not go to the specified url

I'm a beginner at selenium, trying to follow a tutorial using eclipse and testng. However, it appears that the actual test does not get carried out because it doesn't navigate to the url in my code.
This is my input:
package script;
import com.thoughtworks.selenium.*;
import org.junit.AfterClass;
import org.testng.annotations.*;
import org.openqa.selenium.server.SeleniumServer;
public class Baseline extends SeleneseTestCase {
#BeforeClass
public void setUp() throws Exception {
SeleniumServer seleniumserver = new SeleniumServer();
seleniumserver.boot();
seleniumserver.start();
setUp("http://www.google.com", "*iexplore");
}
#Test
public void testBaseline(){
selenium.open("/");
selenium.windowMaximize();
selenium.windowFocus();
selenium.type("q", "selenium rc");
selenium.click("btnG");
selenium.waitForPageToLoad("30000");
assertTrue(selenium.isTextPresent("Results * for selenium rc"));
}
#AfterClass
public void tearDown(){
selenium.close();
selenium.stop();
}
}
testng's ouput:
16:44:10.326 INFO - Java: Sun Microsystems Inc. 20.1-b02
16:44:10.328 INFO - OS: Windows 7 6.1 x86
16:44:10.339 INFO - v2.0 [a2], with Core v2.0 [a2]
16:44:10.459 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
16:44:10.461 INFO - Version Jetty/5.1.x
16:44:10.461 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
16:44:10.462 INFO - Started HttpContext[/selenium-server,/selenium-server]
16:44:10.462 INFO - Started HttpContext[/,/]
16:44:10.503 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#1be2d65
16:44:10.503 INFO - Started HttpContext[/wd,/wd]
16:44:10.506 INFO - Started SocketListener on 0.0.0.0:4444
16:44:10.506 INFO - Started org.openqa.jetty.jetty.Server#32fb4f
16:44:10.563 INFO - Checking Resource aliases
16:44:10.570 INFO - Command request: getNewBrowserSession[*iexplore, http://www.google.com, ] on session null
16:44:10.572 INFO - creating new remote session
16:44:10.695 INFO - Allocated session 4a50ca969de04033b77cdb88dfd8af1a for http://www.google.com, launching...
16:44:11.106 INFO - Launching Embedded Internet Explorer...
16:44:12.126 INFO - Launching Internet Explorer HTA...
the program does not terminate.
For firefox the browser opens a blank url. For IE8, it navigates to a local temporary folder.
How do I get it to navigate to the url as specified?
Which version of selenium-standalone-server you are having?
Do you have stanalone server on you lib folder?.Please download Selenium-server-standalone-2.0b3.jar and replace with existing one . Let me know still you are having any issues?
Excellent!!! I was having lots of trouble finding out the issue. Turns out that Selenium Server jar file that I was using is outdated. Also, the one mentioned above Selenium-server-standalone-2.0b3.jar is deprecated. So taking cue from the above answer from Mani, went to this link http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.3.0.jar&can=1&q=Selenium-server-standalone and downloaded selenium-server-standalone-2.3.0.jar and replaced this with the old selenium-server.jar file. Voila... now firefox4 and firefox5 work :)
Thanks,
Safi