Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Huxley fails to take a screenshot #69

Open
alitheg opened this issue Sep 17, 2014 · 1 comment
Open

Huxley fails to take a screenshot #69

alitheg opened this issue Sep 17, 2014 · 1 comment

Comments

@alitheg
Copy link

alitheg commented Sep 17, 2014

I've just downloaded Huxley on Windows 8.1, and added a Huxleyfile to my project. After some tussling with Firefox and Selenium versions, I finally got Huxley to launch a browser. However, when I go back to the command line and hit Enter to take a screenshot, Huxley crashes with the following error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Python27\lib\site-packages\huxley\threadpool.py", line 32, in thread
    func(*args, **kwargs)
  File "C:\Python27\lib\site-packages\huxley\cmdline.py", line 69, in run_test
    screensize=screensize
  File "C:\Python27\lib\site-packages\huxley\main.py", line 110, in main
    TestRun.record(local_d, d, (url, postdata), screensize, filename, diffcolor, sleepfactor, save_diff)
  File "C:\Python27\lib\site-packages\huxley\run.py", line 122, in record
    screenshot_step = ScreenshotTestStep(d.execute_script('return Date.now();') - start_time, run, len(steps)) TypeError: unsupported operand type(s) for -: 'unicode' and 'long'
@alitheg
Copy link
Author

alitheg commented Sep 17, 2014

The crash seems to be fixed by changing this:

  screenshot_step = ScreenshotTestStep(d.execute_script('return Date.now();') - start_time, run, len(steps))

to this:

  screenshot_step = ScreenshotTestStep(d.execute_script('return Date.now().getTime();') - start_time, run, len(steps))

@alitheg alitheg changed the title Huxley opens two browser windows and fails to take a screenshot Huxley fails to take a screenshot Sep 17, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant