Can I use Appium desktop to run test scripts? - 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.

Related

MicrosoftWebDriver 16299, 15063 doesn't work when I minimise Edge browser window

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?

Differences between Selenium grid versions 1 and 2

Could someone please help me understand the difference between the remote control server in Selenium Grid 1 and the remote control server in Selenium Grid 2. From what I've read, one of the main differences between the versions is that version 2 of Selenium Grid was merged with Selenium Remote Control. Is this the same remote control as Selenium 1, that was responsible for proxy injection? as I thought this had been deprecated.
This is as of Selenium 3.4.0
We now have two separate artifacts.
For example if you head down to the Selenium downloads URL you would notice the following two artifacts
selenium-server-standalone-3.4.0.jar - This is the Grid (or Grid2 as you call it) as we know. This standalone jar can work in 3 modes viz.,
Hub - It acts as the hub standing in between your test and the actual node that gets the work done. Kind of like a postman/mailman and a match maker.
Node - This is the actual place where all the action happens. When running in this mode, it is responsible for getting automation requests from the tests routed via the Hub and opens up browsers, performs UI actions etc.,
Standalone - This is pretty much the same as Node but just that it doesn't require a Hub to route the automation test traffic to it. Tests can directly point at the Standalone and then start running. I believe this is perhaps the kind of setup that third party execution environment providers such as SauceLabs maybe using. (This is just a hunch, I don't know for sure).
selenium-html-runner-3.4.0.jar - This is where all the legacy stuff (or Selenium RC as you call it) has moved into. So if you had a html test suite that you created by recording a UI flow using Selenium IDE and wanted to run them from a command line (Note that you can always execute a html test suite from within the Selenium IDE and don't need anything extra), you would use this.
There is nothing called as Selenium Grid1 anymore. There's only Selenium Grid2 (which is the re-engineered version of Grid1).
The Selenium RC support exists only as a stop gap solution with no maintenance as part of selenium-html-runner-3.4.0.jar. This has been officially deprecated and there's no support for issues that surface on this.
The expectation is that if one were to be using Selenium and building new tests, then one should be directly using only the WebDriver APIs (which is Selenium2) and not fall back to using DefaultSelenium APIs (which is Selenium1)
Hope that helps!

FireFox still not working for Protractor/Selenium tests?

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

Watir Integration tests with phantomjs not working with internet

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?

How to disable firefox from opening while running test suite in Selenium IDE?

I am writing test scripts in Selenium IDE for my application but everytime when I run the test suite it opens up browser and performs all the actions and logs failures, if any. My requirement is to invoke the test script from command prompt using .bat file and generate a test report. I am able to do the same but the problem is firefox opens up and executes the test case one by one. Can anyone please suggest me how to disable Firefox window from opening up? Or is it just not possible to do so? Or do I need to switch to Selenium Webdriver in order to achieve my requirement? My application contains Ajax upto a lot of extent.
I have read many commands used in Selenium IDE but I could not find any command which can serve this purpose. Please suggest!
If you know any programming language supported by selenium-webdriver (Ruby, Java, Python, C#) then you should try PhantomJS WebDriver which allow to run scripts without opening visual browser session
Selenium-IDE are mean to invoke browser, that's how the script react to all the exact browser behavior.
Only selenium Webdriver allow you to run your browser under "Headless" mode, which in fact, put Firefox under X-virtual frame buffer in background, as above #Andersson suggested.
Unfortunately, there is no easy way to convert your Selenium-IDE script to your desire programming language at the moment.
If your concern is about "cluttered screen" in OS such as ubuntu, then your solution will be export the whole Selenium-IDE and firefox under another virtual X-display.