Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

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


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

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

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

    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 ! :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-16 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found