Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using NUnit.Framework;
- using OpenQA.Selenium;
- using OpenQA.Selenium.Chrome;
- using OpenQA.Selenium.Firefox;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using OpenQA.Selenium.Support.PageObjects;
- namespace ToolsQA
- {
- class NUnitTest
- {
- [FindsBy(How = How.CssSelector, Using = "input[name='q']")][CacheLookup]
- public IWebElement serchBox { get; set; }
- string url = "https://www.google.com";
- IWebDriver driver;
- [Test]
- public void TestScript()
- {
- driver = new ChromeDriver(@"C:ChromeDriver");
- driver.Navigate().GoToUrl(url);
- ////// exception at this line //////
- serchBox.SendKeys("beyonce");
- }
- [TearDown]
- public void EndTest()
- {
- driver.Quit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement