Created
April 1, 2019 16:47
-
-
Save srhb/cdb7a11ba3dc189be719574e89291420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ./make-test.nix { | |
machine = | |
{ pkgs, ... }: | |
{ | |
imports = [ ./common/x11.nix ]; | |
environment.systemPackages = | |
let | |
python = pkgs.python3.withPackages (ps: [ ps.selenium ]); | |
pythonTest = pkgs.writeScriptBin "test-selenium-firefox" '' | |
#!${python}/bin/python3 | |
from selenium import webdriver | |
webdriver.Firefox() | |
''; | |
in with pkgs; [ | |
pythonTest | |
geckodriver | |
firefox | |
]; | |
}; | |
testScript = '' | |
$machine->waitForX; | |
subtest "selenium can launch Firefox", sub { | |
$machine->succeed("test-selenium-firefox"); | |
$machine->screenshot("Firefox"); | |
}; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fails for me with
(click for full terminal output)