so i have this e2e test environment(test framework is jasmine)
which is being powered by puppeteer(headless mode.)
the mechanism works in a way which puppeteer triggers the test's url in a page , and wait's for jasmine to end it's evaluation.
everything works great beside tests which involves scrolling to a certain area in the viewport.
if i change headless to false , the tests run's great.
so, anyone knows if puppeteer knows how to deal with scrolling in headless?
thanks ! (if anyone has a different hint why things are not working feel free to share)
Related
Using Selenium Webdriver on Ruby, is there a way to set up Firefox to be opened on "Responsive Design View" and continue executing tests for the whole session?
I've done it on Google Chrome and it's working fine (sans the touch support part). For Firefox, I've only seen questions around creating preset for screen size but not much activity on how to actually execute tests on said profile.
Please advise.
Note - App coded in Extjs
Certain ExtJs elements or parts of elements (like titles) are not appearing or loading when using the selenium launched FF.
Things I tried
Going to the same page with a manually launched firefox - works
Stopping the test after login to use the launched version and going
to the same with issues - still see issues
Updated to latest version of FF - same issues.
Is there anything with the Firefox driver in selenium that could be causing these discrepancies?
To add to to the situation I can actually get the store behind the grid that isn't loading up
The thing is ExtJS is using a really annoying HTML5 features, which need a bit more then simple simulations of user interactions. For ecample an element could be with no childs, but when you will click on it, it will automatically load all of it's childs. That's why you don't see all the elements.
For that purposes, if you are using java you should use http://html5robot.com or similar things, which are developed to help Webdriver interact with complex HTML5 solutions.
I've got a Selenium test which crashes my browser (Firefox) whenever it runs. It's just a simple test (login, logout, login, logout, login ... crash) and I can't reproduce the crash when I do the same things manually, so I think the problem is with Selenium itself.
However, the issue could be that my Firefox starts with different options than when Selenium starts it. I could confirm that's not the case if I could start Firefox the exact same way Selenium starts it (eg. without plug-ins, with all history cleared, etc.) ... but I'm not sure how to do that.
Can anyone tell me which options to use to make Firefox run the same way as when Selenium runs it?
I was never able to find out how to emulate Selenium's use of Firefox. I tried using a fresh Firefox profile, but that still seemed to have differences from how Selenium ran Firefox.
Instead I wound up re-writing my test to be two tests, and then it was able to log in/out twice in the first test and once in the second test, avoiding the issue I was trying to debug (which only manifests when I try to log in/out 3 times in the same test).
If anyone can provide a better explanation of how to emulate Selenium's running of Firefox I'd be happy to accept that answer.
I have a proprietary application for automated testing that I built here at work that uses Selenium WebDriver classes to test our applications. It uses Firefox, but sometimes, when a new browser is launched, Firefox will open in Safe Mode and display the Safe Mode dialog. This seems to happen completely randomly, i.e. I will set up twenty tests to run and at any point this might happen. There only one block code that can be executed from test to test to launch a new browser, so it isn't in the testing application. Is there a way to override, or bypass, the safe mode dialog when this happens?
I need to run regressions overnight a lot of the time and it's frustrating when I see that my tests have been hung because of this
I would like to embed dojo/robot tests is java application.
Java application would use java-webengine for load web pages and for embed dojo script to these pages. Java-webengine gives possibility run java script.
I understand, that DOH use system mouse and keyboards events. User of my application does not see web browser page (browser running in background by webengine).
I have a couple of questions:
1. What happen with mouse pointer during DOH test execution?
2. It is possible to run DOH tests in my application internally(in the background)?
3. What happens if user will type on the keyboard or move mouse during test execution? (For instance user may switch for other application, e.g. Microsoft Word.)
Thanks!
A few things --
Dojo tests can be run from the command-line using node.js or Rhino.
I have created a DOH test suite that is backed with a Java web server and that works well, BUT...
To clarify, not all of the DOH robots use system mouse & keyboard events, only 1 particular robot (robotx) simulates actual user input. When using robotx, the mouse & keys behave as directed by the tests. If you mouse off the browser, the tests will be aborted (an alert comes up notifying you of this). Therefore, robotx cannot be run in the background because it is actually interacting with the browser.
You may have some luck using the other robots coupled with node.js or Rhino. The key concept is that you should be looking for some "headless" browser testing scenario, which is generally what Rhino handles (I believe Node can do this as well) while avoiding use of robotx.
Basically, as long as you are not using robotx (the one that actually takes control of UI) you should be able to start the tests & minimize the browser or use a headless browser engine.