The project I'm trying to do uses watir-webdriver and selenium-webdriver and phantomjs to write tests. And these tests go green while internet is not connected, but when internet is connected ,it gives a net:timeout error. What could be the possible reasons?
Related
I am using Hound (https://github.com/HashNuke/hound) for integration testing a Phoenix application. I have chrome and chrome headless working. To get it working I have another terminal window running chromedriver (installed via brew). This feels odd to me. Is there a library or test setup that would feel more "integrated" into the application? What's the Elixir way of doing this?
In the Ruby world there's the webdrivers gem (https://github.com/titusfortner/webdrivers). As far as I know it downloads a specified driver (lets say chromedriver) to $HOME. Then with every test run, the test uses the driver downloaded to that destination to execute the tests.
Before the webdrivers gem there was chromedriver-helper gem. Before that it was phantomjs. These implementations made it so running integration tests required 1: downloading the driver 2: running the test
In Elixir (with Hound) I have my tests working by first running chromedriver --verbose in a terminal split, and in the other screen I run mix test. This works fine but feels disjointed. This adds extra steps, 1: download the driver 2: start the driver 3: run the test 4: stop driver
I could write a script manually to run chromedriver in the background, and stop it after the tests are run.
I am new to the Elixir community and so I've researched a lot. It's still not clear to me if there is a "traveled path" I should go down vs just hooking everything up manually.
Have I missed a recommended abstraction? Is this intentional? Is this "just not created, yet"?
Thank you
Have you checked out wallaby? See https://github.com/keathley/wallaby
When I execute tests using MicrosoftWebDriver for Edge all works fine, but when I minimise the window all tests become failed. Does Edge or MicrosoftWebDriver have any options to avoid that behavior?
As you have been trying to minimise the Browser Window while your Test Execution is In Progress it will be against all the Best Practices. At this point it is worth to mention that as Selenium mocks the User Actions hence Selenium needs Browser focus. If the focus is lost Selenium won't be able to execute the lines of code. Consider the following steps while your Test Execution :
Browser Maximize : While you execute your tests always keep the Web Browser maximized so majority of the elements are within the Viewport
As per best practices, you should try to execute your Test Scripts / Automation Framework in an isolated Test Environment away from Manual Intervention with all the required Software and Hardware configurations and setup.
You can find a detailed discussion in How to run chrome driver in background using selenium with Ruby for Mac OSx?
You also have an option to use Google Chrome or Mozilla Firefox in Headless version.
For Firefox you can find a detailed discussion in How to make firefox headless programatically in Selenium with python?
For Chrome you can find a detailed discussion in selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH error with Headless Chrome
For Ghost Browser you can find a detailed discussion in Which drivers support “no-browser”/“headless” testing?
Have gone through several Appium Desktop tutorial but all of them only showed how to manually test in the inspector window.
Does Appium desktop support automation test scripts? If so, how to send my tests written in node to it, or is there a handy npm package for the connection?
Thanks!
Finally connected webdriver to appium. Turns out webdriver can also be used for mobile testing.
Here are several points got me confused, hope it can help those who came into the same scene:
webdriver is not web exclusive - it can also be used for mobile e2e testing.
Appium server and Appium inspector do not necessarily work together. Once the server is started, it can be connected by an appium inspector or other services, e.g. webdriver.
Inspector is mostly for manual inspection. So far I haven't seen the possibility to supply automation test scripts to it.
And here's a complete walkthrough to those who're not familiar with Appium.
I have a project suite of automation tests that uses Protractor and Jasmine. As of a couple months ago, my tests stopped working in FireFox. Everything works perfectly in Chrome, and almost perfectly in IE.. because why would IE work ya know.
There have been multiple posts about this and I've read through all of them, but I haven't been able to determine if there's a workaround/solution to this. It's not entirely a HUGE deal if my tests run in FireFox, but with a web application it's mighty nice to be able to test all instances.
Basically what happens when I run a test in FireFox:
Command prompt acts like everything is about to run properly (FireFox driver starts up.. server remains running etc etc)
Firefox opens for a split second (icon appears on the task bar, browser flashes on the screen and closes)
After a good minute or so protractor gives me the following message:
[firefox #01-0] WebDriverError: Unable to connect to host XXX on port XXX
after 45000 ms.
With a ton of DEBUG lines referring to JSON files and Firefox addons.
Any thoughts or other sources I could check out would be sweet. Many thanks in advance.
Problem is with latest Firefox support from latest selenium-server. Use geckoDriver and it will work.
Follow this URL
My company has a Chrome App I have been running automated testing on using Selenium and Chromedriver on Mac and Windows. They recently asked if it would be possible to get an automation setup going on an actual ChromeBook. I had initially looked into this ~three years ago, but the Autotest and Chromedriver integration into the Chromium test builds wasn't in place then.
From all of the research I have done thus far it appears to be possible. However there really seems to be a lack of instructions and documentation for Autotest, test_that (Autotest's Chromium script), and how to get it hooked to the DUT (Device Under Test). Chromedriver is built into the Chromium test images (and I have located it on my own Chromium test build) and supposedly can be launched using Autotest on the DUT from a host chronos root.
If anyone knows of a good resource or has first hand knowledge please let me know. I'll post links to all the Chromium resources I have been reading.
Is there a decent resource for autotest and test_that script usage within a Chromium test build?
Many thanks!
https://chromium.googlesource.com/chromiumos/third_party/autotest/
https://sites.google.com/a/chromium.org/chromedriver/getting-started/chromeos