- Now i want to redirect the my current page to check new form of family details form so how can i do this
- HTML code for family details link is
- <a href="/Admin/CountryMaintenanace"><span>Maintenancespan>a>
- <a href="/Admin/CountryMaintenanace"><span>Maintenancespan>a>
- using System.IO;
- using System.Text;
- using OpenQA.Selenium;
- using OpenQA.Selenium.Chrome;
- using OpenQA.Selenium.Support.UI;
- using System.Drawing.Imaging;
- namespace eulogin
- {
- class Program
- {
- static void Main(string[] args)
- {
- // Initialize the Chrome Driver
- using (var driver = new ChromeDriver(@"C:\Users\v.dusane\Documents\Visual Studio 2012\Projects\ToolsQA"))
- {
- // Go to the home page
- driver.Navigate().GoToUrl("http://localhost:36000/login");
- // Get the page elements
- driver.FindElement(By.Id("UserName exampleInputEmail2")).SendKeys("Admin");
- driver.FindElement(By.Id("Pwd exampleInputPassword2")).SendKeys("Admin@123");
- driver.FindElement(By.Id("logid")).Click();
- driver.FindElement(By.LinkText("/Admin/CountryMaintenanace")).Click();
- // Take a screenshot and save it into screen.png
- driver.GetScreenshot().SaveAsFile(@"screen.png", ImageFormat.Png);
- }
- }
- }
- }
Loading

Abhishek AroraPosted Jan 12, 2017, 1:22 PM
Rohitash Kumar DixitPosted Nov 10, 2016, 7:25 AM