How we run selenium script using java on sauce labs mac. - saucelabs

I was written a Selenium script for windows and i want to run that script on mac but I don't have mac.
Is there any chance to work with a mac with same script?
I was thinking using sauce lab for it. But i unable to understand it that how we use saucelab for run java script on mac.
Is any body give me steps to work with sauce labs.

Running on Sauce Labs is very straight forward. The first think you will need to do is create an account with Sauce Labs. Once you have an account all you need todo is point your Selenium Remote Webdriver to run on Sauce Labs. I attached a link to help get you started, I'm guessing your Selenium scripts are written in Java. https://saucelabs.com/java

Related

How to configure Microsoft edge based on chromium to run robotframework with python automation script

Looking out for steps to configure microsoft edge based on chromium to launch robotframework script using python.
Well, you just need to search for a bit and you'd find that you need a webdriver, which will take you to this Microsoft site with webdrivers for Edge.
When you have the driver and everything is set up, you can open Edge browser using Open Browser keyword.
From the previous comments i figured that you have installed the edge driver and you are not able to find open browser command. Here is the Solution
Install Selenium library using command
pip install robotframework-seleniumlibrary
pip install -U selenium
Import them
Then you will easily find the command Open Browser!
Let me know if it Helps!

"Selenium server standalone" jar vs "selenium java" jar

I am bit confused here..
"selenium-server-standalone" jar contains all the library files to run script then why do we need to use "selenium-java" jars?
I read somewhere that its used for Language Binding.. if it is true, then please help me to understand the meaning of Language binding as well.
Thanks.
In the previous version of Selenium, which is Selenium RC (Remote Control), it is mandatory that you need to run selenium-server-standalone.jar jar file, which acts like a server. Selenium RC will then use this server to establish a communication channel between browser and the code. Also, this jar file contains all the library functions to be used in our code.
But in later version of Selenium, which is Selenium WebDriver, there is no need to run this jar file, as the WebDriver api will directly communicate with the browser's native language. So, this jar file is replaced with selenium-java.jar jar files
Hope this helps.
It is mainly use in the Selenium Grid. As we use different OS and browsers with different machines, we need to run it same time for various reason. In selenium Grid, we use the machine Hub and Node(You can go through selenium grid docs for more), so for running the selenium in different machines with the main machine, we need server standalone.
WebDriver and the Selenium-Server
You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.
There are some reasons though to use the Selenium-Server with Selenium-WebDriver.
You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
You want to connect to a remote machine that has a particular browser version that is not on your current machine.
You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver
http://www.seleniumhq.org/docs/03_webdriver.jsp#how-does-webdriver-drive-the-browser-compared-to-selenium-rc

Running java based webdriver scripts in unix server

I have written webdriver+TestNG scripts in windows using java. Now there is an upcoming requirement to run the same scripts in UNIX server without much of code modification. I have heard about running tests in headless browser, but I dont know about this much. I searched a lot but there is no clear and simple response to start looking into this.
Is it possible to just change the driver instance to htmlunitdriver and run the same in unix environment? How could I create the tests as a package and move to unix environment for running the scripts?
You can run your existing script by making few changes in driver instance creation. Suppose you are using Firefox driver for your test, then you can run your script in headless mode using virtual display Xvfb (Xvfb is an X server that can run on machines with no display hardware and no physical input devices).
Below are the steps to run your tests in headless mode:
Install Xvfb
Start the Xvfb by executing this command Xvfb :99 -screen 0 1024x768x24 & Xvfb Manual
Then create a Firefox driver instance that uses virtual display started in step 2 as below:
FirefoxBinary fb = new FirefoxBinary();
fb.setEnvironmentProperty("DISPLAY", ":99");
WebDriver driver = new FirefoxDriver(fb,null);
Now your script will run in headless mode. You may need to change few other things like path of your test data or any other references that uses windows file system (like C:\)

Web Automation that can also run Unix Commands

Does anyone know of web automation software/app that also can run unix scripts? I know of the standard ones, but can't find out whether I can also run Unix scripts.
It's pretty common to multitask like that inside of Selenium WebDriver automation code.
For example, you could write a Selenium test in Python that also launches arbitrary external programs/scripts via Python's built-in support for executing commands.

Get BlackBerry simulator to print to command line/console

I would like to have the BlackBerry simulator print to console so that I can debug with out an IDE. I do all my development from Linux with bb-ant-tools and have the emulator running on windows (on a separate computer). I don't have eclipse or the jde on windows, just the emulator.
--edit 02/28/10
After much searching it appears I need to connect to the simulator to jdb and to do that I need to find the default JDWP port or how to change it with out the JDE's JDWP application. I am looking at possibly port 8000, I hope it isn't randomly assigned.
--edit 03/02/10
Correction, the JDWP application is required as it is what you connect the jdb to by jdb -connect com.sun.jdi.SocketAttach:hostname=host,port=8000 but output is placed in output tab of JDWP making it very unlikely that it can print to a console and be done without the JDE. I would very much like to be proven wrong though.
A couple of things, not sure they will be very helpful.
jdb IS a command line tool, so you should be able to get console out that way.
For Linux, you can use the Barry tools that give you the jdwp as bjdwp command, then you should be able to use jdb
Also, you can get the Simulator to work on Linux by using Wine. I am able to run both the Barry tools and the Simulator on my mac.
I hate writting up such a short not detailed enough answer, but hopefully this will help someone else who will have time to provide more details.
PS: Sorry about no http:// but it seems that I am such a newbie I can't put more than one link on my answer.

Resources