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

Many thanks John

Ok i understand but i don't want to work with Firefox but I.E. As you can see i didn't call any instance of Firefox in my code.

Do i need to install a webdriver for Firefox or I.E ? I'm really lost because i though i just have to use module Selenium::Remote::Driver.

I am sorry to disturb with this issue but the informations regarding how to configure Selenium with Perl webdriver are really rares

  • Comment on Re^2: Simple code using Selenium::Remote::Driver

Replies are listed 'Best First'.
Re^3: Simple code using Selenium::Remote::Driver
by davies (Monsignor) on Nov 08, 2018 at 13:25 UTC

      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

        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