How to install Selenium WebDriver on Mac OS X 10.7.5 supporting Chrome, Firefox and safari ? What I have to set, where to install.
Install
If you use homebrew (which I recommend), you can install selenium using:
brew install selenium-server
Running
updated -port port_number
To run selenium, do: selenium-server -port 4444
For more options: selenium-server -help
Mac already has Python and a package manager called easy_install, so open Terminal and type
sudo easy_install selenium
To use the java -jar selenium-server-standalone-2.45.0.jar command-line tool you need to install a JDK.
You need to download and install the JDK and the standalone selenium server.
First up you need to download Selenium jar files from http://www.seleniumhq.org/download/. Then you'd need an IDE, something like IntelliJ or Eclipse. Then you'll have to map your jar files to those IDEs. Then depending on which language/framework you choose, you'll have to download the relevant library files, for example, if you're using JUnit you'll have to download Junit 4.11 jar file. Finally don't forget to download the drivers for Chrome and Safari (firefox driver comes standard with selenium). Once done, you can start coding and testing your code with the browser of your choice.
I installed Selenium web driver (for Chrome) by first:
downloading the appropriate web driver from here.
then navigated to mac's folder /usr/local/bin and pasted the downloaded web driver there.
Afterwards just ran the file there by double clicking it.
The file was installed there so that we do not have to specify the WebDriver path when instantiating the browser.
For more detailed walkthrough, you can reference from here.
Related
I have followed this instructions:
https://www.utest.com/articles/selenium-setup-on-a-mac-and-configuring-selenium-webdriver-on-mac-os
But when I tried mvn test, I get an error:
sh-3.2# mvn test
sh: mvn: command not found
sh-3.2#
Then, I tried to download this as well:
http://www.seleniumhq.org/download/
The file, selenium-server-standalone-3.8.1.jar is not installing. Does nothing when I double click it.
I also downloaded Katalon Studio, works well in iOS. It also supports windows and linux, but our boss said, use Selenium only because we already have test cases built in Selenium.
So, is there any other way to install Selenium in macOS High Seirra 10.13?
I have eclipse installed on my windows machine, but I can't seem to use it with bash so I installed eclipse on the bash terminal by using "sudo apt-get install eclipse". It installed fine, but I can't figure out how to launch the eclipse GUI from the linux subsystem so I can use it like the windows version. I tried using Xming and exporting DISPLAY, but that didn't work. Any ideas?
from what i understood from the link below, you require to update .bashrc to direct the GUI display to a X Server process. I installed xMing to run X Server from Windows 10. i also had to install gtk components that allowed me to run sublime text GUI from within WSL.
https://medium.com/#pck/how-to-use-sublime-text-3-from-command-line-with-ubuntu-bash-terminal-in-windows-10-subsystems-for-aa2ad59d088c
hope this helps
IMHO you should not install eclipse by apt but simply get your desired eclipse product from from https://www.eclipse.org/downloads/packages , download and unzip it to your wanted location and just start eclipse.
Reasons:
I do not know any Linux distribution containing a newer eclipse bundled, so you are always having older versions being slower and having less features
You can update your eclipse installation directly inside eclipse Check for updates
You can have multiple installations at same time
If you want to get rid of a eclipse installation just remove the folder and you are done.
But of course you can also use bash directly in Windows with Eclipse.
Please look at
https://stackoverflow.com/a/62724163/2590615 or take a glimpse at You Tube Video about Bash Debugging with Bash Editor eclipse plugin on a Windows 10 machine
PS: I am the maintainer of the mentioned eclipse plugin
I am using Firefox 27 (previously 26) on Ubuntu 12.04 LTS with a Tomcat application with the Selenium stand alone server 2.39 (latest form Maven) including in the application. Everything works fine with Chrome but i would prefer to use Firefox, which cannot work. The Firefox is installed from the standard distributions using xvfb. Again, all the setup is fine as Chrome works, but when i try to use firefox with the following code:
WebDriver webDriver = new FirefoxDriver();
webDriver.get("www.google.com");
When i take a screen shot of the xvfb, i see a window with the following error:
"Your firefox profile cannot be loaded. It may be missing or inaccessible".
The webDriver.get("www.google.com") just hangs and does not ever return.
The same code works fine on my development machine, Mac OSX.
I've tried to downgrade firefox and to no avail, same issue. Anyone have any suggestions?
This seems like an OS problem (read/write permissions or so), rather than a Selenium problem. It seems someone managed to fix it by changing the owner of the Firefox cache folder.
Try executing these commands:
sudo -s
chown -hR $USER:$USER ~/.cache/mozilla
Please take a look at this and let us know if it worked Ubuntu - Firefox profile cannot be loaded after upgrade
I found out the issue. When running in Ubuntu under Tomcat, the Tomcat instance is run with a root user (tomcat7) when installed from the standard distros. The issue was, which was pointed to me by Mourasman's response, was Firefox wants to create a .cache/mozilla directory. This is not possible with a root user. In order to fix this on the Ubuntu machine, I had to run Tomcat as a "real" user on the system with a home directory that allowed Firefox to create the cache directories it wants (even though Selenium gives it its own profile).
I had trouble doing this using the Ubuntu tomcat distro (I know there is a user and group field in /etc/default/tomcat7) but i could never get it to work. When i changed the user, which i'm assuming has to do with permissions, it never did work.
So i ended up downloading the source from Tomcat and starting Tomcat manually.....
Hope this helps anyone else who is trying to use Firefox in Selenium in a Tomcat application.
Thanks Mourasman for the pointer on the .cache directory....
I am a newbie in selenium, trying to learn step by step. I have a system - Mac os x 10.6.8 with current jdk 1.6. Please help me with the instructions on how to install Selenium webdriver set up with Intellij 12 on this mac. I found various articles on windows but I have a hard time to find one for mac.
Thanks.
You can use Maven to manage your dependencies, but if it is too complicated for your project - just add the Java? webdriver to your path in intellij
See example: how to add a jar to my lib/ directory in intelliJ and have the classes available for my web.xml?
Yesterday I had install the eclipse and the Android plugin. Everything works perfectly, but I would like to install the SVN plugin too. I had add the suite, and selected the three main components, but when I click on the next it stack in. The eclipse write "Calculateing requriements and dependencies" and than I just waiting.
So I had disabled all another update site and it works, but then I got the following message:
"could not upgrade:missing compnents: svn.rep.grap". It is very good, but I would like to install this component at NOW beside of the another svn tools.
Any ideas?
The Subclipse plugin can be installed from the Eclipse Marketplace Client or by adding the update site URL of http://subclipse.tigris.org/update_1.8.x
Note that Subclipse requires the JavaHL native library that is part of Subversion. The easiest way to get this is to install the latest Subversion client distribution provided by CollabNet:
http://www.open.collab.net/downloads/community/
You can also install Subversion via MacPorts. Both of these include the JavaHL library and properly link it in your System folder so that is visible to the Subclipse plugin running in Eclipse. I would assume you could also install via Homebrew but I have not tried that option.