Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I just want to mention that (possibly due to having later version(s) of some component(s)) I did get WWW::Selenium working using just "*firefox" as the browser setting. I did create a custom firefox profile in c:/selenium/firefox (which is still necessary due to one of the server startup options below), and at first used "*custom firefox..." like you had, but every time I started the Selenium server and launched Firefox, I had to create an exception for the SSL certificate (even with -trustAllSSLCertificates, and for some reason, I could not get "*firefox" working at first). Then I went back to using "*firefox", and everything worked! The only slightly annoying thing is that everytime Firefox starts, I get the add-on popup window with the message "3 new add-ons have been installed" ... not sure how to suppress that...have been looking for likely suspects.

UPDATE: Actually, now I don't even need the -firefoxProfileTemplate or the -trustAllSSLCertificates options below, and I don't get the Add-on popup window. Also, I found the command to shutdown the Selenium RC server ('stop' only shuts Firefox down...do_command('shutDown') shuts the server down - and "do_command()" is undocumented AFAICT).

Update: shutDown changed to shutDownSeleniumServer in newer versions of Selenium.

I did add some options to the selenium server startup. Here is what the beginning of my program looks like:

#!/usr/bin/perl use strict; use warnings; use WWW::Selenium; $ENV{PATH}="c:\\progra~1\\mozill~1;$ENV{PATH}"; # The first argument "1" is to make this run in the background # and not block on Windows. You would of course do this # differently on a *nix or other system. system(1, "java", "-jar", "c:/selenium/seleni~1.0-b/seleni~1.0-b/se23ae~1.0-b/seleni~1.jar", "-firefoxProfileTemplate", "c:/selenium/firefox", "-trustAllSSLCertificates", ); my $base = "https://xxxxx.xxxxx"; my $url = "$base/login/login.asp"; my $sel = WWW::Selenium->new( host => 'localhost', port => 4444, browser => "*firefox", # browser => '*custom firefox -no-remote -profile c:/selenium/firefo +x', browser_url => $base, ); $sel->start(); $sel->open($url); #And at the end... $sel->stop(); $sel->do_command('shutDownSeleniumServer');

In reply to Re: Using WWW::Selenium To Test Or Automate An Ajax Website by runrig
in thread Using WWW::Selenium To Test Or Automate An Ajax Website by Limbic~Region

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (4)
    As of 2018-07-21 08:11 GMT
    Find Nodes?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

      Results (445 votes). Check out past polls.