Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. Starting ChromeDriver 2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a)
  2. on port 9515
  3. Only local connections are allowed.
  4.  
  5. namespace RevuSeleniumAutomation
  6. {
  7. using Microsoft.VisualStudio.TestTools.UnitTesting;
  8. using OpenQA.Selenium;
  9. using OpenQA.Selenium.Chrome;
  10. using OpenQA.Selenium.Firefox;
  11. using OpenQA.Selenium.IE;
  12. using OpenQA.Selenium.Remote;
  13. using OpenQA.Selenium.PhantomJS;
  14. using System;
  15.  
  16. [TestClass]
  17. public class RevuAutomater
  18. {
  19. private string baseURL = "http://example.com/";
  20. private RemoteWebDriver driver;
  21. private string browser;
  22. public TestContext TestContext { get; set; }
  23.  
  24. [TestMethod]
  25. [TestCategory("Selenium")]
  26. [Priority(1)]
  27. [Owner("Chrome")]
  28.  
  29. public void AutomateSite()
  30. {
  31. driver = new ChromeDriver();
  32. driver.Manage().Window.Maximize();
  33. driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
  34. driver.Navigate().GoToUrl(this.baseURL);
  35. driver.FindElementById("UserName").SendKeys("user");
  36. driver.FindElementById("Password").SendKeys("12345");
  37. }
  38.  
  39. [TestCleanup()]
  40. public void MyTestCleanup()
  41. {
  42. driver.Quit();
  43. }
  44.  
  45. [TestInitialize()]
  46. public void MyTestInitialize()
  47. {
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement