Failed to install Selenium :: WebDriver in perl6

I'm doing it:

zef install Selenium::WebDriver

      

And I make it stuck:

===> Searching for: Selenium::WebDriver
===> Testing: Selenium::WebDriver:ver('0.0.1')
Cannot obtain a session after 10 attempts
  in submethod BUILD at /home/user123/.zef/store/perl6-selenium-webdriver.git/5e3ff320d2f392e44df1433f0544201c154f2590/lib/Selenium/WebDriver/Wire.pm6 (Selenium::WebDriver::Wire) line 66
  in block <unit> at t/05-firefox.t line 45

# Looks like you planned 91 tests, but ran 1
JavaScript error: , line 0: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIAppStartup.trackStartupCrashEnd]

      

My OS - arch linux - updated.

+3


source to share


1 answer


Summary

  • Like all Perl 5 or Perl 6 packages, the Selenium :: WebDriver package includes a suite of tests that verify that it works correctly on your system. 1 This test suite gets run at the end of the installation, that is, the installer downloads the package, runs its builder code, and only then runs its test suite. If there is an error, then (default 2 ) the installer displays error information and exits immediately. What did he do in your case.

  • The current Selenium :: WebDriver package was successfully installed 2 months ago , complete with a post showing success on Ubuntu for the same test that is crashing on your system. Again, looking at # perl6 logs for 'selenium' suggests that an intermittent error may have occurred with one of the modules that Selenium :: WebDriver uses; this may indeed be the cause of the problem.

  • The README repo for Selenium :: WebDriver starts with a link to a document that says the protocol it describes is "deprecated". The most recent item in the queue for the Selenium :: WebDriver replication release is called Add Support for Firefox Marionette WebDriver . Please consider adding a comment to this question pointing to this SO question if you think it is relevant.

  • If you look at the error messages, you will see that the Firefox test failed. One possibility is that there is a bug in Firefox or some related software that goes beyond the official newest Arc Linux.


Some plausible simple responses to Firefox error message:

  • Try downloading Firefox manually before trying to install the Perl 6 package. Does this fix the problem?

  • I don't know what options you have to prevent the Selenium :: WebDriver package from seeing your Firefox other than uninstalling it completely, but maybe you can do that? Then try installing again (and presumably the package will test / use, say, Chrome instead of Firefox).

  • If that doesn't work, consider posting a new Selenium :: WebDriver replication issue (and link to this SO question).


Top-level error message: "Unable to get session after 10 attempts." It is generated on line 66 of the package file lib / Selenium / WebDriver / Wire.pm6. I don't think this line helps a lot in this case, but they should always at least look at the source code corresponding to the error messages.



Looking down at the next level, we see that the error comes from "t / 05-firefox.t line 45", which is my $driver = Selenium::WebDriver::Firefox.new;

. It looks like it's trying to connect to Firefox and not working. Looking further at this test script, you can see that it thinks it found Firefox on your system (since the block of code in unless which('firefox') { ... }

obviously didn't fire).

The deepest piece of error information shows that a "JavaScript error" is encountered, something to do with nsIAppStartup.trackStartupCrashEnd

.


Often the problem is related to software versions. The version of the Selenium :: WebDriver package is explicit 0.0.1

, but it would be nice to see the version information from other major parts, including your Perl 6 compiler ( perl 6 -V

iirc), installer ( zef -V

iirc), and your OS and Firefox. In this particular case, I'm sure the problem is not with your Perl 6 compiler ( Rakudo

) or your installer ( zef

), but I could be wrong and I still recommend that you always consider including generous version information in it when you submit your the first version of the question.


1 The test suite for the Selenium :: WebDriver package works according to the Perl 6 Testing Guide in general and in the Testing README section of the Selenium :: WebDriver replica in particular.

2 You can usually force the installation of Perl installers whether or not you know that the error does not matter in your case. I think that -force-test

to force zef

to continue testing rather than stop after the first error and -force-install

to complete the installation despite errors.

+2


source







All Articles