Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Simple code using Selenium::Remote::Driver

by davies (Prior)
on Nov 08, 2018 at 11:23 UTC ( [id://1225409]=note: print w/replies, xml ) Need Help??


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

Oversimplification: Firefox has an interface that is unlike other browsers. Geckodriver is the tool that converts commands and data between the format Firefox understands and the format Selenium understands. So yes, you need it. And note that the same applies to some other browsers like Edge, although obviously a different driver is needed.

Regards,

John Davies

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

Replies are listed 'Best First'.
Re^2: Simple code using Selenium::Remote::Driver
by Perlchaoui (Sexton) on Nov 08, 2018 at 12:47 UTC

    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

        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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1225409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-18 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found