Automated browser testing using selenium, Nunit, Selenium Grid, C #, webdriver / remote control

I’m learning how to automate browser testing in a few weeks using all sorts of methods. Seleniums website is very vague on which is the best route.

I have installed

  • Selenium webdriver
  • Remote control
  • Selenium Mesh
  • Apache ant
  • Nunit (and almost everything you might need)

I finally give up my attempts and want to know how to do this.

I want to be able

  • Upload the same webpage to several different browsers.
  • Upload the same webpage to multiple virtual machines (which I installed)
  • Ability to take pictures comparing different browser results.

I know C # programming and prefer running tests through Nunit.

- -, ? .

+5
4

junit Selenium WebDriver, . , , , .

-

, . , . , , , ( ) ,

  • Windows IE7 FireFox
  • Windows IE8 FireFox
  • Windows IE9 Firefox
  • Linux FireFox

, Selenium IE Windows. IE FF, . - . WebDriver DesiredCapabilities , .

Platform desiredPlatform;
DesiredCapabilities desiredCapabilities;
desiredPlatform = Platform.LINUX;
desiredCapabilities = DesiredCapabilities.firefox();
desiredCapabilities.setPlatform(desiredPlatform);
desiredCapabilities.setVersion("11");

WebDriver driver = new RemoteWebDriver("http://hubURL", desiredCapabilities);

- ( )

, , , . JUnit , RemoteWebDrivers, . node, , . , .

, , , Junit . , Std.err . , Std.out . html, , Std.out, .

,

, , . IE , . , , . , . :

WebDriver augmentedDriver = new Augmenter().augment(driver);
TakesScreenshot ss = (TakesScreenshot) augmentedDriver;
String base64Screenshot = ss.getScreenshotAs(OutputType.BASE64);
byte[] decodedScreenshot = Base64.decodeBase64(base64Screenshot.getBytes());
FileOutputStream fos = new FileOutputStream(new File(imageName));
fos.write(decodedScreenshot);
fos.close();

, , .

. , , , , . , , , , QA .

+8

: Grid . Jenkins - ​​ Jenkins.

1-, , . node. , . , . , , Selenium Grid. , Java, TestNG.

. ? ?

+1

Selenium RC , webdriver - . , java-. , - #

, IDE (VS express), nUnit selenium #, nUnit selenium VSExpress

script, , - Selenium Nunit #

- selenium #

- ( ) Remote webdriver webdriver. webdriver . . / - webdriver #

, / webdriver - #/Selenium

0

Telerik. Telerik. Framework - , (AJAX), , / . .

, . NUnit MbUnit.

, .

(: Telerik Test Studio)

-1

All Articles