Created
February 19, 2016 13:08
-
-
Save nadvolod/6029c9f93be7bc346ec7 to your computer and use it in GitHub Desktop.
Sample code that works with Nunit to prepare it for parallelization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using OpenQA.Selenium.Firefox; | |
namespace ParallelLocal | |
{ | |
[TestFixture] | |
public class ParallelLocal | |
{ | |
[Test] | |
public void Test1() | |
{ | |
var driver = new FirefoxDriver(); | |
driver.Navigate().GoToUrl("http://www.qtptutorial.net/automation-practice"); | |
driver.Manage().Window.Maximize(); | |
driver.FindElementById("idExample").Click(); | |
var elementCheck = driver.FindElementByXPath("//p[contains(text(),'Button success')]").Displayed; | |
Assert.IsTrue(elementCheck, "Element was not present"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment