开发者

Help with Selenium Webdriver download?

开发者 https://www.devze.com 2023-04-08 06:08 出处:网络
I have Selenium IDE and i want to install Selenium Webdriver. 1) Can anyone tell me where can i download selenium webdriver. i don\'t see any link available in the documentation.

I have Selenium IDE and i want to install Selenium Webdriver. 1) Can anyone tell me where can i download selenium webdriver. i don't see any link available in the documentation. 2)Can i use selenium webdriver with PHPUnit? I see some materials saying php is not supported in selenium 2 however there are some download links available for phpbindings f开发者_开发知识库or webdriver what is this exactly? 3)If i have Selenium webdriver do i still need selenium server to run test cases in different browsers?

I would appreciate your answers...


I completely agree with you. They have a ton of documentation, but they do a horrible job of explaining what you actually need. It took me about 2 days to put all the pieces together. You will need a few things...

If you are running tests with C#, download NUnit, C# client drivers. Create a class library project in Visual Studio and reference the dlls (assemblies) for NUnit (for appropriate dotnet version) and the C# client drivers. Compile your class library. It should create a dll inside of the bin\Debug directory. Then go into NUnit, create a project, and then open your assembly in that bin\Debug directory. That should get you started.

If you're developing using Java, download JUnit (not NUnit) and then download the Java Client Drivers, and use Eclipse instead of Visual Studio. You can launch JUnit right from Eclipse.

I've only tried NUnit and JUnit before. But I'm sure PHPUnit can also be launched from Eclipse (educated guess). There seems to be the most documentation for Java and Python.. from experience, but I've been doing everything in .NET and I haven't had anything I couldn't solve.

The Unit Testing software isn't required, but the code the format add-ins for Firefox Selenium IDE will build the code for NUnit (C#) or JUnit (Java), etc... so most use those tools.

If you want to get some boilerplate code, go into Selenium IDE and turn on experimental features under options. Then export your C# code (or Java code) from the format menu after you've recorded your commands. It won't all convert 100%, so be aware of that. Just google from there to get questions answered.

One thing to watch out for... clickAndWait commands won't convert to click and wait in the code. You will either need to do an implicit wait or a thread.sleep wait after certain commands before you'll be able to access the next element if you're waiting for an action to occur. You will also want to turn on native events so you can fire certain JavaScript events. Your fire events won't work if the driver doesn't have this turned on. The WebDriver driver.

If you have any other questions, let me know.


You can download Selenium server as well as client driver from the following:

http://code.google.com/p/selenium/downloads/list

You can download "php-webdriver-bindings-0.9.0.zip" from the following source:

http://code.google.com/p/php-webdriver-bindings/downloads/detail?name=php-webdriver-bindings-0.9.0.zip


In C# context:

Now the better way of including packages in C# project is using nuGet. nuGet is packaging utility which when executed from its powershell command window, quickly downloads the dll files and links them to project. Below link details on how to use nUGet to install packages of selenium webdriver, selenium support and nUnit.

How to invoke/run different type of web driver browser using remote webdriver in C#

0

精彩评论

暂无评论...
验证码 换一张
取 消