facebookarchive / huxley Goto Github PK
View Code? Open in Web Editor NEWA testing system for catching visual regressions in Web applications.
License: Apache License 2.0
A testing system for catching visual regressions in Web applications.
License: Apache License 2.0
How about appending "-chrome" and "-firefox" and such to screenshots so that those of different browsers don't clash?
Typing characters that require modifiers keys (i.e. an @
symbol in an email address) don't properly record.
It appears the issue is a combination of the recording and playback code. The recording code only stores the keyCode, but the keyCode references the physical key pressed, not the character that results. This would be okay if the modifier key status was also recorded, but it's not.
I was going to submit a PR with a patch, but quickly realized this is a much trickier problem than it looks. I see two strategies:
With (1), the result should be more accurate. But the implementation is a bit tricker - simulating keyboard events is rife with browser differences and outstanding bugs.
On the other hand (2) is less accurate (not actually replaying key events, so in-app key bindings won't fire), but easier to implement (setting the value of inputs is much easier than replaying key events).
I'm thinking of working up a PR to try solving this, but want to get feedback on which approach makes more sense first.
I tryed to use huxley on windows.
It successfully open firefox browser, take a screenshot. When I enter Q+Enter it start re-run my actions. It succesfully rerecord, but when it start the playback, huxley crashing with next error:
Traceback (most recent call last):
File "C:\Users\Plokhov\Envs\test\Scripts\huxley-script.py", line 9, in <module>
load_entry_point('Huxley==0.3', 'console_scripts', 'huxley')()
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\cmdline.py", line 150, in main
sys.exit(plac.call(_main))
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\plac_core.py", line 195, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\cmdline.py", line 127, in _main
screensize=screensize
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\main.py", line 109, in main
TestRun.record(local_d, d, (url, postdata), screensize, filename, diffcolor, sleepfactor, save_diff)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\run.py", line 152, in record
cls.rerecord(test, path, url, remote_d, sleepfactor, diffcolor, save_diff)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\run.py", line 79, in rerecord
cls.playback(test, path, url, d, sleepfactor, diffcolor, save_diff)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\run.py", line 85, in playback
run._playback(sleepfactor)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\run.py", line 95, in _playback
step.execute(self)
File "C:\Users\Plokhov\Envs\test\Lib\site-packages\huxley\steps.py", line 97, in execute
os.unlink(new)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'index.huxley\\last.png'
see below
Traceback (most recent call last):
File "/Users/luca/anaconda/bin/huxley", line 9, in <module>
load_entry_point('Huxley==0.4', 'console_scripts', 'huxley')()
File "/Users/luca/anaconda/lib/python2.7/site-packages/huxley/cmdline.py", line 153, in main
sys.exit(plac.call(_main))
File "/Users/luca/anaconda/lib/python2.7/site-packages/plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File "/Users/luca/anaconda/lib/python2.7/site-packages/plac_core.py", line 195, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/Users/luca/anaconda/lib/python2.7/site-packages/huxley/cmdline.py", line 130, in _main
screensize=screensize
File "/Users/luca/anaconda/lib/python2.7/site-packages/huxley/main.py", line 136, in main
return 0
File "/Users/luca/anaconda/lib/python2.7/contextlib.py", line 154, in __exit__
self.thing.close()
File "/Users/luca/anaconda/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 445, in close
self.execute(Command.CLOSE)
File "/Users/luca/anaconda/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "/Users/luca/anaconda/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: u"Window not found. The browser window may have been closed.\nCommand duration or timeout: 12 milliseconds\nBuild info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'\nSystem info: host: 'lucas-air', ip: '192.168.2.165', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.1', java.version: '1.6.0_65'\nSession ID: 6a479e5d-d23a-9a49-86ed-eb58defb4264\nDriver info: org.openqa.selenium.firefox.FirefoxDriver\nCapabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=24.0, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]" ; Screenshot: available via screen ; Stacktrace:
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance (Constructor.java:513)
at org.openqa.selenium.remote.ErrorHandler.createThrowable (ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed (ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:569)
at org.openqa.selenium.remote.RemoteWebDriver.close (RemoteWebDriver.java:418)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke (Method.java:597)
at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke (EventFiringWebDriver.java:101)
at com.sun.proxy.$Proxy2.close (None:-1)
at org.openqa.selenium.support.events.EventFiringWebDriver.close (EventFiringWebDriver.java:194)
at org.openqa.selenium.remote.server.handler.CloseWindow.call (CloseWindow.java:32)
at org.openqa.selenium.remote.server.handler.CloseWindow.call (CloseWindow.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:303)
at java.util.concurrent.FutureTask.run (FutureTask.java:138)
at org.openqa.selenium.remote.server.DefaultSession$1.run (DefaultSession.java:170)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:918)
at java.lang.Thread.run (Thread.java:695)
Always showing error:
_imagingft.c:62:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
^
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
Hi, I've installed Huxley using zip file on windows 7 64-bit. I've two selenium-webdriver versions (2.0.32 and 2.0.33) installed on my system. When I launched Huxley in record mode, it is launching two firefox browsers and from the second browser it is taking the screen shots. When I quit from Huxley, script ends with an error saying that event function not able to record the events. In the resultant created file, "record.json" is empty.I'm using 'selenium-server-standalone-2.33.0.jar'.
Please assist in resolving this problem.
Is there a way to record a new test without re-recording old ones?
If I add a test to Huxleyfile.json
, it seems like I have to re-record all of the tests.
I have been working around this by:
hux -r
enter
to skip tests I've already recordedIs there a huxlified way to do this?
When I type a hyphen in an input field, it is being recorded into the record.json file as a soft-hyphen (\u00ad). When the record.json file is played back, the soft-hyphen is ignored by the browser, so abc-123 is replayed as abc123.
Suggestions on what I can do to fix this would be greatly appreciated. At present I'm editing the record.json file and changing \u00ad back to -. Thank you for this awesome tool!
More of a question here, can't seem to find much info around or a forum for discussion so thought i'd ask it here.
Is there suggestions on how to setup huxley to run thorough CI on pages that are not static ? I have an issue where the test servers do not necessarily have the same database setup as the development environment, so there are regularly widgets that will not be in sync showing different data.
Would like to hear of ways people have been getting around this issue
On installation, I receive this when the Huxley installation reaches PIL.
Could not find any downloads that satisfy the requirement PIL==1.1.7 (from huxley)
Some externally hosted files were ignored (use --allow-external PIL to allow).
Cleaning up...
No distributions at all found for PIL==1.1.7 (from huxley)
Storing debug log for failure in /Users/nathan/Library/Logs/pip.log
Have installed Pillow separately, still receiving issue.
When running setup.py with Python 3.4, gives error "NameError: name 'execfile' is not defined"
With Python 2.7, gives error "ImportError: No module named setuptools"
how am I supposed to install huxley?
I'm having a problem when attempting to start a fresh record with Huxley. The exception error returned is below:
------------------------------------
Running Huxley file: huxtestfile.txt
------------------------------------
[login] Running test: login
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python27\Lib\threading.py", line 808, in __bootstrap_inner
self.run()
File "C:\Python27\Lib\threading.py", line 761, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Users\Test\projects\net10-test\net10-test\lib\site- packages\huxley\threadpool.py", line 32, in thread
func(*args, **kwargs)
File "C:\Users\Test\projects\net10-test\net10-test\lib\site-packages\huxley\cmdline.py", line 69, in run_test
screensize=screensize
File "C:\Users\Test\projects\net10-test\net10-test\lib\site-packages\huxley\main.py", line 83, in main
d = webdriver.Remote(remote, CAPABILITIES[browser])
File "C:\Users\Test\projects\net10-test\net10-test\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 72, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Users\Test\projects\net10-test\net10-test\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 115, in start_session
'desiredCapabilities': desired_capabilities,
File "C:\Users\Test\projects\net10-test\net10-test\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 166, in execute
self.error_handler.check_response(response)
File "C:\Users\Test\projects\net10-test\net10-test\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: None ; Stacktrace:
I have installed Huxley into a python virtualenv and ensured that the selenium server is running before attempting to start the record. My huxley file is a very basic:
[login]
url=http://2.2.2.2/login.html
I've confirmed my web application is accessible from Firefox (using the above URL) and I can navigate to 127.0.0.1:4444/wd/hub successfully.
Checking the response in Fiddler shows POST request contains a NULL value for the sessionID. The resulting NullPointerException error appears to be the root cause of my Unknown Error.
{"sessionId":null,"status":13,"value": {"message":null,"localizedMessage":null,"suppressed": [],"cause":null,"class":"java.lang.NullPointerException","hCode":3963113,"stackTrace": [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null, null,null,null,null,null,null]},"state":"unhandled error","class":"org.openqa.selenium.remote.Response","hCode":2501105}
Any help would be much appreciated.
Cheers.
Would it be possible for Huxley to automatically run through each webpage, without any action from the user (including rerecord) when specified?
In the Huxleyfile, an option like autorecord=true
could be added for each test, which would mean on pages where no GUI changes majorly, testing is much faster.
I want to use huxley to test my website, but my company have set the firewall, so I must set a proxy to open my website by urlopen.
How can I do?
Instead of locking to a certain version, allow the user to have different patch version of the required libraries.
For example, instead of requiring only 2.2.1
'Pillow==2.2.1'
Allow the user to have anything that starts with 2.2, like the latest 2.2.2 of the given Pillow (PIL fork), which itself is a bit tricky to get installed while in Windows x64.
'Pillow>=2.2'
pip install huxley
...
File "build\bdist.win32\egg\setuptools\command\egg_info.py", line 369, in add_
defaults
File "build\bdist.win32\egg\setuptools\command\sdist.py", line 296, in read_ma
nifest
File "build\bdist.win32\egg\setuptools\command\egg_info.py", line 284, in appe
nd
File "c:\Python27\lib\distutils\util.py", line 124, in convert_path
raise ValueError, "path '%s' cannot be absolute" % pathname
ValueError: path '/' cannot be absolute
My Huxley version is 0.4. Selenium Standalone Server is 2.35.0. IEDriverServer is 2.35.1. OS is Windows Server 2008 R2. Browser is IE 8.
I found that this code
start_time = d.execute_script('return Date.now();')
produces javascript error when using IE while Firefox is ok.
Why not using Python time to get start time?
Below is my traceback. Thank you.
C:\Program Files\Python27\Scripts\huxley.exe --record
Running Huxley file: Huxleyfile
Running test: toggle
Begin record
Traceback (most recent call last):
File "C:\Program Files\Python27\Scripts\huxley-script.py", line 9, in
load_entry_point('Huxley==0.4', 'console_scripts', 'huxley')()
File "build\bdist.win-amd64\egg\huxley\cmdline.py", line 153, in main
File "C:\Program Files\Python27\lib\site-packages\plac_core.py", line 309, in
call
cmd, result = parser_from(obj).consume(arglist)
File "C:\Program Files\Python27\lib\site-packages\plac_core.py", line 195, in
consume
return cmd, self.func(_(args + varargs + extraopts), *_kwargs)
File "build\bdist.win-amd64\egg\huxley\cmdline.py", line 130, in _main
File "build\bdist.win-amd64\egg\huxley\main.py", line 109, in main
File "build\bdist.win-amd64\egg\huxley\run.py", line 109, in record
File "C:\Program Files\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\se
lenium\webdriver\remote\webdriver.py", line 397, in execute_script
{'script': script, 'args':converted_args})['value']
File "C:\Program Files\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\se
lenium\webdriver\remote\webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "C:\Program Files\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\se
lenium\webdriver\remote\errorhandler.py", line 152, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u"JavaScript error (WARN
ING: The server did not provide any stacktrace information)\nCommand duration or
timeout: 168 milliseconds\nBuild info: version: '2.35.0', revision: 'c916b9d',
time: '2013-08-12 15:42:01'\nSystem info: os.name: 'Windows Server 2008 R2', os.
arch: 'x86', os.version: '6.1', java.version: '1.7.0_25'\nSession ID: c8b4e699-d
daf-4f20-8996-34b4dd619916\nDriver info: org.openqa.selenium.ie.InternetExplorer
Driver\nCapabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBe
havior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSes
sion=false, browserName=internet explorer, enableElementCacheCleanup=true, unexp
ectedAlertBehaviour=dismiss, version=8, ie.usePerProcessProxy=false, ignoreProte
ctedModeSettings=false, cssSelectorsEnabled=true, requireWindowFocus=false, init
ialBrowserUrl=http://localhost:3598/, handlesAlerts=true, ie.forceCreateProcessA
pi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitch
es=, takesScreenshot=true}]" ; Screenshot: available via screen ; Stacktrace: Me
thod newInstance0 threw an error in None
I think this tool is awesome, just want to make sure I understand the constraints.
I set up a record that tried to scroll down a page, click an element, and record the ui reaction.
The screenshot is taken full-document-length, which seems good. But the click records x, y
relative to the viewport, and no scroll action is ever recorded. The result is that unintended places are clicked during the playback.
Is this a bug, intended feature, or known limitation?
when q+enter to finish record, after huxley playback, wrtie record.json file error
I use windows7, default encode is gbk, when I finished record, huxley report decodeError.
the trackback is:
Traceback (most recent call last):
File "E:\Python27\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "E:\Python27\lib\threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "build\bdist.win-amd64\egg\huxley\threadpool.py", line 32, in thread
func(_args, *_kwargs)
File "build\bdist.win-amd64\egg\huxley\cmdline.py", line 69, in run_test
screensize=screensize
File "build\bdist.win-amd64\egg\huxley\main.py", line 110, in main
TestRun.record(local_d, d, (url, postdata), screensize, filename, diffcolor,
sleepfactor, save_diff)
File "build\bdist.win-amd64\egg\huxley\run.py", line 152, in record
cls.rerecord(test, path, url, remote_d, sleepfactor, diffcolor, save_diff)
File "build\bdist.win-amd64\egg\huxley\run.py", line 75, in rerecord
run._playback(sleepfactor)
File "build\bdist.win-amd64\egg\huxley\run.py", line 95, in _playback
step.execute(self)
File "build\bdist.win-amd64\egg\huxley\steps.py", line 61, in execute
print ' Typing', self.key
UnicodeEncodeError: 'gbk' codec can't encode character u'\xbe' in position 0: il
legal multibyte sequence
Im trying to implement Huxley as way to test css regression, using the project Styleguide as the canonical source where the tests happen.
Although i get the idea of single function testing, most tests require a full page screenshot, instead of just a small portion.
Any way I can do that?
I am in the examples directory and huxley crashes. Just installed it.
localhost:examples kb1$ huxley --record
Traceback (most recent call last):
File "/usr/local/bin/huxley", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2607, in
parse_requirements(requires), Environment()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: jsonpickle==0.4.0
localhost:examples kb1$
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
I am trying to make a test for a chart widget which seems to render slightly different each time. I was hoping running huxley with with --record and --save-diff would save the diff between the rerecorded and the second run screenshot, but it doesn't. And the record.json is empty so I have to record my getting to the unstable chart again.
I understand I have to create a test page for just that one chart and test only that, so I won't need a complicated interaction to get to it, but wouldn't it be nice to have the diffs/record.json saved anyway?
On re-recording the test, I getting the below error which results in a blank record.json file
print ' Typing', self.key
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 0: ordinal not in range(128)
[Full Trace:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 761, in run
self.__target(_self.__args, *_self.__kwargs)
File "/Library/Python/2.7/site-packages/huxley/threadpool.py", line 32, in thread
func(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/huxley/cmdline.py", line 69, in run_test
screensize=screensize
File "/Library/Python/2.7/site-packages/huxley/main.py", line 110, in main
TestRun.record(local_d, d, (url, postdata), screensize, filename, diffcolor, sleepfactor, save_diff)
File "/Library/Python/2.7/site-packages/huxley/run.py", line 152, in record
cls.rerecord(test, path, url, remote_d, sleepfactor, diffcolor, save_diff)
File "/Library/Python/2.7/site-packages/huxley/run.py", line 75, in rerecord
run._playback(sleepfactor)
File "/Library/Python/2.7/site-packages/huxley/run.py", line 95, in _playback
step.execute(self)
File "/Library/Python/2.7/site-packages/huxley/steps.py", line 61, in execute
print ' Typing', self.key
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 0: ordinal not in range(128)
]
Hi,
I'm using the Twitter Bootstrap framework to display a simple modal panel with a button in it. Huxley is able to record the test case where I open the modal, then click on the button. However, during playback, it spits this error out (which is from Selenium):
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Element is not currently visible and so may not be interacted with
Build info: version: '2.34.0', revision: '11cd0ef', time: '2013-08-06 17:10:22'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.4', java.version: '1.6.0_51'
Driver info: driver.version: unknown
at <anonymous class>.fxdriver.preconditions.visible(file:///var/folders/1c/c828yyp916x8cxzgntwnt5fm0000gn/T/anonymous4476072821512445183webdriver-profile/extensions/[email protected]/components/command_processor.js:8230)
at <anonymous class>.DelayedCommand.prototype.checkPreconditions_(file:///var/folders/1c/c828yyp916x8cxzgntwnt5fm0000gn/T/anonymous4476072821512445183webdriver-profile/extensions/[email protected]/components/command_processor.js:10799)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/1c/c828yyp916x8cxzgntwnt5fm0000gn/T/anonymous4476072821512445183webdriver-profile/extensions/[email protected]/components/command_processor.js:10816)
at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///var/folders/1c/c828yyp916x8cxzgntwnt5fm0000gn/T/anonymous4476072821512445183webdriver-profile/extensions/[email protected]/components/command_processor.js:10821)
at <anonymous class>.DelayedCommand.prototype.execute/<(file:///var/folders/1c/c828yyp916x8cxzgntwnt5fm0000gn/T/anonymous4476072821512445183webdriver-profile/extensions/[email protected]/components/command_processor.js:10763)
17:40:07.625 WARN - Exception: Element is not currently visible and so may not be interacted with
Doing a bit of investigation, looks like it might be an issues with the Selenium FF driver, This might be related:
Any idea how to resolve this?
Rob
Hi,
Having the toggle app running, I executed the the following Huxley command and I get the following output.
[toggle] Running test: toggle
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in **bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, _self.__kwargs)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/huxley/threadpool.py", line 32, in thread
func(_args, _kwargs)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/huxley/cmdline.py", line 81, in run_test
screensize=screensize
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/huxley/main.py", line 83, in main
d = webdriver.Remote(remote, CAPABILITIES[browser])
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 72, in __init
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 114, in start_session
'desiredCapabilities': desired_capabilities,
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: None ; Stacktrace:
Any ideas why Huxley is not working?
I'm I have installed Huxley on a Window 8 machine, however when I try to execute the Huxley record command I get the following error...
No huxleyfile found anywhere..
any idea what is wrong?
One particular error keeps getting returned when I record and run the Huxley tests, on particular pages only. This error has been found before and the solution was unclear (#27).
Here's an example of the error returned on such pages:
NathanMBA:test nathan$ huxley --record
--------------------------------------
Running Huxley file: HuxleyfileCurrent
--------------------------------------
[UTIL02-0_FAQs.html] Running test: UTIL02-0_FAQs.html
Begin record
Press enter to take a screenshot, or type Q+enter if you're done
1 screenshots taken
Press enter to take a screenshot, or type Q+enter if you're done
q
Up next, we'll re-run your actions to generate screenshots to ensure they are pixel-perfect when running automated. Press enter to start.
Begin rerecord
Sleeping for 1395.0 ms
Clicking [726, 285]
Sleeping for 2284.0 ms
Taking screenshot 0
Playing back to ensure the test is correct
Begin playback
Sleeping for 1395.0 ms
Clicking [726, 285]
Sleeping for 2284.0 ms
Taking screenshot 0
Exception in thread Thread-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 761, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.macosx-10.9-intel/egg/huxley/threadpool.py", line 32, in >thread
func(*args, **kwargs)
File "build/bdist.macosx-10.9-intel/egg/huxley/cmdline.py", line 69, in >run_test
screensize=screensize
File "build/bdist.macosx-10.9-intel/egg/huxley/main.py", line 110, in main
TestRun.record(local_d, d, (url, postdata), screensize, filename, >diffcolor, sleepfactor, save_diff)
File "build/bdist.macosx-10.9-intel/egg/huxley/run.py", line 152, in record
cls.rerecord(test, path, url, remote_d, sleepfactor, diffcolor, save_diff)
File "build/bdist.macosx-10.9-intel/egg/huxley/run.py", line 79, in rerecord
cls.playback(test, path, url, d, sleepfactor, diffcolor, save_diff)
File "build/bdist.macosx-10.9-intel/egg/huxley/run.py", line 85, in playback
run._playback(sleepfactor)
File "build/bdist.macosx-10.9-intel/egg/huxley/run.py", line 95, in _playback
step.execute(self)
File "build/bdist.macosx-10.9-intel/egg/huxley/steps.py", line 103, in >execute
raise TestError('Screenshot %s was different.' % self.index)
TestError: Screenshot 0 was different.
The page has no animation or anything on it that would cause the screenshot to be different.
Like this idea a lot...
Is there a way to perform some form of "fuzzy" compare?
Imagine I've just changed a color in my app and now all tests have to be recreated because the Hux strats tripping over each and every reference screenshot?
. D
Hi,
Having the toggle app running, I executed the the following Huxley command and I get the following output.
[toggle] Running test: toggle
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in **bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, _self.__kwargs)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/huxley/threadpool.py", line 32, in thread
func(_args, _kwargs)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/huxley/cmdline.py", line 81, in run_test
screensize=screensize
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/huxley/main.py", line 83, in main
d = webdriver.Remote(remote, CAPABILITIES[browser])
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 72, in __init
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 114, in start_session
'desiredCapabilities': desired_capabilities,
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: None ; Stacktrace:
Any ideas why Huxley is not working?
I tried all the things, gone through so many group discussions. Somewhere mentioned don't use find(by.linkText), I removed all , I am searching the elemet either by ID or by xpath but not working.
Error log is:
[ERROR - 2014-09-10T14:35:31.758Z] WebElementLocator - handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1410359731708
FAILED: test
org.openqa.selenium.NoSuchElementException: {"errorMessage":"Unable to find element with xpath './/[@id='tab-rtmedia-bbpress']'","request":{"headers":{"Accept":"application/json, image/png","Connection":"Keep-Alive","Content-Length":"59","Content-Type":"application/json; charset=utf-8","Host":"localhost:25638"},"httpVersion":"1.1","method":"POST","post":"{"using":"xpath","value":".//[@id='tab-rtmedia-bbpress']"}","url":"/element","urlParsed":{"anchor":"","query":"","file":"element","directory":"/","path":"/element","relative":"/element","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/element","queryKey":{},"chunks":["element"]},"urlOriginal":"/session/991e39d0-38f7-11e4-bc18-493d4e2f927e/element"}}
Command duration or timeout: 41.27 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
System info: host: 'rtcamp-pc', ip: '192.168.0.59', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_05'
Driver info: org.openqa.selenium.phantomjs.PhantomJSDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, handlesAlerts=false, databaseEnabled=false, version=1.9.7, platform=XP, browserConnectionEnabled=false, proxy={proxyType=direct}, nativeEvents=true, acceptSslCerts=false, driverVersion=1.1.0, locationContextEnabled=false, webStorageEnabled=false, browserName=phantomjs, takesScreenshot=true, driverName=ghostdriver, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 991e39d0-38f7-11e4-bc18-493d4e2f927e
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:404)
at org.openqa.selenium.By$ByXPath.findElement(By.java:357)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at testscripts.bbPressSettingsTest.bbPressSettings(bbPressSettingsTest.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
System info: host: 'rtcamp-pc', ip: '192.168.0.59', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_05'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:125)
... 30 more
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: {"errorMessage":"Unable to find element with xpath './/[@id='tab-rtmedia-bbpress']'","request":{"headers":{"Accept":"application/json, image/png","Connection":"Keep-Alive","Content-Length":"59","Content-Type":"application/json; charset=utf-8","Host":"localhost:25638"},"httpVersion":"1.1","method":"POST","post":"{"using":"xpath","value":".//_[@id='tab-rtmedia-bbpress']"}","url":"/element","urlParsed":{"anchor":"","query":"","file":"element","directory":"/","path":"/element","relative":"/element","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/element","queryKey":{},"chunks":["element"]},"urlOriginal":"/session/991e39d0-38f7-11e4-bc18-493d4e2f927e/element"}}
Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
System info: host: 'rtcamp-pc', ip: '192.168.0.59', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_05'
Driver info: driver.version: unknown
Default test
Tests run: 1, Failures: 1, Skips: 0
Default suite
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@7a46a697: 35 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@61064425: 93 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@1c6b6478: 26 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@3abfe836: 9 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@6ed3ef1: 33 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 5 ms
Win7 Pro Python34 - I am getting: NameError: name 'execfile' is not defined
note: also tried with Python 27 but it didn't have pip
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Al
C:\Users\Z003BXMW>pip install huxley
Downloading/unpacking huxley
Downloading Huxley-0.5.tar.gz
Running setup.py (path:C:\Users\Z003BXMW\Ap
Traceback (most recent call last):
File "", line 17, in
File "C:\Users\Z003BXMW\AppData\Local\T
execfile(os.path.join(DIRNAME, 'huxle
NameError: name 'execfile' is not defined
Complete output from command python setup
Traceback (most recent call last):
File "", line 17, in
File "C:\Users\Z003BXMW\AppData\Local\Temp\
execfile(os.path.join(DIRNAME, 'huxley',
NameError: name 'execfile' is not defined
I created a Huxleyfile
like at tutorial and execute following command huxley --record
but take No Huxleyfile found
error. It is probably basic mistake but i can't understand. By the way my Huxleyfile at examples/
directory.
I would like to check when sites I have links to change, and see what changed.
Hello,
this is awesome tool - thanks for making this available !
I have a question about how to define other browsers, default is firefox
as I can see. I couldn't find any env variable that would control this,
so I made some changes to main.py and cmdline.py to support this
via env variables. But in case I re-invented the wheel, please tell me how
to it properly :)
Thanks !
Alex
pip install huxley
failed, so I had to run the following individually:
$ pip install jsonpickle
$ pip install plac
$ pip install selenium
$ pip install pil
Finally, I could run:
$ pip install huxley
Want me to add this to the README?
System:
Darwin 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
full install log:
http://fpaste.org/85382/
I have huxley installed, but I always get a command not found.
Proof it's installed:
$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install huxley
Requirement already satisfied (use --upgrade to upgrade): huxley in /Users/lucy/Library/Python/2.7/lib/python/site-packages
Requirement already satisfied (use --upgrade to upgrade): selenium==2.35.0 in /Users/lucy/Library/Python/2.7/lib/python/site-packages (from huxley)
Requirement already satisfied (use --upgrade to upgrade): plac==0.9.1 in /Users/lucy/Library/Python/2.7/lib/python/site-packages (from huxley)
Requirement already satisfied (use --upgrade to upgrade): Pillow==2.2.1 in /Library/Python/2.7/site-packages (from huxley)
Requirement already satisfied (use --upgrade to upgrade): jsonpickle==0.4.0 in /Library/Python/2.7/site-packages (from huxley)
Cleaning up...
Install command from #53
And here's the error:
examples (master) $ huxley --record
-bash: huxley: command not found
I'm running the huxley --record
command from the examples folder, is that right? Am I missing something?
Thanks!
Hi,
I have a page with a button, when user presses it, it makes a backend AJAX call, then refreshes the page on success. I want to record the before and after, however, the following error came up:
huxley.errors.TestError: Could not call window._getHuxleyEvents(). This usually means you navigated to a new page, which is currently unsupported.
I understand why it's happening, but is it possible for huxley to navigate between pages, and continue recording?
Rob
Exception in thread Thread-1:
Traceback (most recent call last):
File "E:\Python27\lib\threading.py", line 810, in **bootstrap_inner
self.run()
File "E:\Python27\lib\threading.py", line 763, in run
self.__target(_self.__args, _self.__kwargs)
File "build\bdist.win-amd64\egg\huxley\threadpool.py", line 32, in thread
func(_args, _kwargs)
File "build\bdist.win-amd64\egg\huxley\cmdline.py", line 69, in run_test
screensize=screensize
File "build\bdist.win-amd64\egg\huxley\main.py", line 137, in main
return 0
File "E:\Python27\lib\contextlib.py", line 154, in __exit
self.thing.close()
File "E:\Python27\lib\site-packages\selenium-2.35.0-py2.7.egg\selenium\webdriv
er\remote\webdriver.py", line 445, in close
self.execute(Command.CLOSE)
File "E:\Python27\lib\site-packages\selenium-2.35.0-py2.7.egg\selenium\webdriv
er\remote\webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "E:\Python27\lib\site-packages\selenium-2.35.0-py2.7.egg\selenium\webdriv
er\remote\errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: u"Error communicating with the remote browser. It m
ay have died.\nBuild info: version: '2.39.0', revision: 'ff23eac', time: '2013-1
2-16 16:11:15'\nSystem info: host: 'hugoxie-PC0', ip: '10.33.64.52', os.name: 'W
indows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_45'\nDriver
info: driver.version: EventFiringWebDriver" ; Stacktrace:
I am trying to get Huxley to work on a simple login flow where I enter the username/password and the page redirects to a different url after login. While I can capture the screenshots, when I hit q+enter I get the below error. Can I use huxley to test scenarios like these?
Note that Huxley works otherwise when I am testing a single page like the toggle example included.
Press enter to take a screenshot, or type Q+enter if you're done
q
Traceback (most recent call last):
File "/usr/local/bin/huxley", line 9, in <module>
load_entry_point('Huxley==0.2', 'console_scripts', 'huxley')()
File "/usr/local/lib/python2.7/dist-packages/huxley/cmdline.py", line 126, in main
sys.exit(plac.call(_main))
File "/usr/local/lib/python2.7/dist-packages/plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File "/usr/local/lib/python2.7/dist-packages/plac_core.py", line 195, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/usr/local/lib/python2.7/dist-packages/huxley/cmdline.py", line 105, in _main
record=True
File "/usr/local/lib/python2.7/dist-packages/huxley/main.py", line 109, in main
TestRun.record(local_d, d, (url, postdata), screensize, filename, diffcolor, sleepfactor, save_diff)
File "/usr/local/lib/python2.7/dist-packages/huxley/run.py", line 127, in record
events = d.execute_script('return window._getHuxleyEvents();')
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 397, in execute_script
{'script': script, 'args':converted_args})['value']
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 152, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u"window._getHuxleyEvents is not a function\nBuild info: version: '2.33.0', revision: '4e90c97', time: '2013-05-22 15:32:38'\nSystem info: os.name: 'Linux', os.arch: 'i386', os.version: '3.5.0-36-generic', java.version: '1.7.0_25'\nDriver info: driver.version: unknown" ; Screenshot: available via screen ; Stacktrace: Method anonymous threw an error in http://localhost:8000/<redirected-url>
Hi!
We are trying to test our website page that requires us to login first. However huxley fails to record a session in this case because we visited two pages during the session, i.e the login page and the actual that we wanted to test.
Do you have any ideas on how to test such website with huxley. Also, is it possible to use huxley in our existing ruby on rails application.
Thanks,
Rajat & Keith
Don't know if it's expected behavior but every time I get a diff huxley gives me a traceback and quits. I have included the output from the example recipe:
$ huxley
-------------------------------
Running Huxley file: Huxleyfile
-------------------------------
Running test: toggle
Running test to determine if we need to rerecord
Begin playback
Sleeping for 2619.0 ms
Taking screenshot 0
Test failed, rerecording...
Begin rerecord
Sleeping for 2619.0 ms
Taking screenshot 0
Sleeping for 2245.0 ms
Clicking [116, 79]
Sleeping for 1355.0 ms
Taking screenshot 1
Sleeping for 2365.0 ms
Clicking [121, 70]
Sleeping for 1857.0 ms
Taking screenshot 2
Playing back to ensure the test is correct
Begin playback
Sleeping for 2619.0 ms
Taking screenshot 0
Traceback (most recent call last):
File "/usr/local/bin/huxley", line 9, in <module>
load_entry_point('Huxley==0.3', 'console_scripts', 'huxley')()
File "/usr/local/lib/python2.7/site-packages/huxley/cmdline.py", line 150, in main
sys.exit(plac.call(_main))
File "/usr/local/lib/python2.7/site-packages/plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File "/usr/local/lib/python2.7/site-packages/plac_core.py", line 195, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/usr/local/lib/python2.7/site-packages/huxley/cmdline.py", line 138, in _main
screensize=screensize
File "/usr/local/lib/python2.7/site-packages/huxley/main.py", line 129, in main
TestRun.rerecord(test, filename, (url, postdata), d, sleepfactor, diffcolor, save_diff)
File "/usr/local/lib/python2.7/site-packages/huxley/run.py", line 79, in rerecord
cls.playback(test, path, url, d, sleepfactor, diffcolor, save_diff)
File "/usr/local/lib/python2.7/site-packages/huxley/run.py", line 85, in playback
run._playback(sleepfactor)
File "/usr/local/lib/python2.7/site-packages/huxley/run.py", line 95, in _playback
step.execute(self)
File "/usr/local/lib/python2.7/site-packages/huxley/steps.py", line 94, in execute
raise TestError('Screenshot %s was different.' % self.index)
huxley.errors.TestError: Screenshot 0 was different.
Hi!
We were tinkering with Huxley and wanted to know if huxley supports/would support recording clicks on a webpage during a test on an element basis instead of cursor position.
This might be helpful to avoid rerecording the test when the position of a UI element on a webpage changes. We would need to rerecord the test because the old click position might not be over the UI element in the new layout. If the recording was done on element basis, the clicking would always work irrespective of the position of the element. Right now, huxley --playback-only fails because it cannot find a ui element at that position with the following error,
"raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u"document.elementFromPoint(0, 700) is null\nBuild info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'\nSystem info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.2', java.version: '1.6.0_37'\nDriver info: driver.version: unknown" ; Screenshot: available via screen ;"
This would be helpful to avoid large amount test rerecording in a large test suite when there are small UI changes.
Please let us know your views.
Thanks,
I am trying to get Huxley up and running so I can evaluate it, and see if it fits my needs. Unfortunately I can't.
I installed Huxley, pip install huxley
.
I did have to install all the dependencies manually, pip install jsonpickle
, pip install plac
, pip install selenium
, pip install PIL
.
I navigate to /examples/webroot/
and fire up the example app, python -m SimpleHTTPServer
.
When I run the tests, huxley
, I get the following:
My Huxleyfile looks like this;
[index]
url=http://localhost:3000/
I navigate to my test app's huxley directory, and try and record, huxley --record
.
First, I get 2 Firefox windows that open;
After I have clicked around, and made my screen shots, when huxley begins re-running my actions, the empty window closes;
Then the whole thing fails;
I really love the idea of Huxley, and want to use it, but this is keeping me from evaluating it. Any thoughts?
Is the current focus stealing strategy is limited to --record
? I see the actual screen shots are taken from a window behind the one in which I operated, as to remove input focus, etc. But when running in any other mode no such focus stealing is being done, which makes the screenshots taken during recording useless since they'll always be different than one the taken by those other modes.
Hey there,
I’m noticing that seems a bit weird is that the actual dimensions of snapped screenshots that I’m seeing don’t seem to match the dimensions that I specify in my Huxleyfile
.
For example;
screensize=1024x768
will reliably result in an image of 1009x663
being written to disk, as will screensize=320x768
result in 305x663
.
Seems fair to assume that the browser chrome is being deducted from the viewport area given the consistent 15px
& 105px
reduction in image size.
I’m assuming that this is a bug? Kinda seems weird behaviour, also is inconsistent to what other tools (phantomjs, for example) do—which is return an image of the same size as specified by screensize
.
PS: Really loving Huxley, thanks for open-sourcing it! 💃
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.