in reply to Re^3: Simple code using Selenium::Remote::Driver
in thread Simple code using Selenium::Remote::Driver

Thanks John. I can imagine you are busy so thank you, appreciated.

ok; i decided to follow you advice and avoid to use I.E. But as i am still on Win 7 i decided to test with Chrome browser instead of Edge.

Here is the code

#!/usr/bin/perl use strict; use warnings; use Test::More; #use Test::Time; use Selenium::Remote::Driver; my $driver = Selenium::Remote::Driver->new( 'remote_server_addr' => 'localhost', 'browser_name' => 'chrome', 'port' => '4444', ); $driver->get('http://www.google.com');
But i got almost the same issue ,as follows :
C:\Users\Documents\TESTPERL>perl TEST.pl Could not create new session: Unable to create new service: ChromeDriv +erService Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02 +T20:13:22.693Z' System info: host: 'LBNL13608', ip: '10.132.5.117', os.name: 'Windows +7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_191' Driver info: driver.version: unknown at TEST.pl line 9.

I launched the chrome webdriver and standalone Selenium server is up and running on port 4444. Maybe it's coming from the location. Because i already added the current location in my %PATH% and as you can see it's not working

Replies are listed 'Best First'.
Re^5: Simple code using Selenium::Remote::Driver
by davies (Monsignor) on Nov 08, 2018 at 17:32 UTC
    use strict; use warnings; use feature 'say'; use Selenium::Chrome; my $url = 'http://www.perlmonks.org'; my $driver = Selenium::Chrome->new(); $driver->get($url); say $driver->get_title(); $driver->quit();

    This works for me, provided that chromedriver is in my path and that everything is up to date. You will get problems if versions are mismatched. Using Win10, I have S::R::D 1.30, chromedriver 2.43.600210 and Chrome 70.0.3538.77.

    Hope this helps.

    Regards,

    John Davies

      Thank you very much John for your time and the support

      I finally found what was going wrong

      I had to use chromedriver in conjunction with Selenium server, with the following command:

      java -Dwebdriver.chrome.driver=path -jar selenium-server-standalone-2. +33.0.jar

      That's why my code wasn't running

      I begin to loove Perl ! :)