Quality Testing

Quality is delighting customers

How to launch a batch file in a Selenium Webdriver project?

How to launch a batch file in a Selenium Webdriver project?

Views: 82

Reply to This

Replies to This Discussion

Hi Madhavi Latha

In your case ,You can Automate your Windows bases operation using AutoIT ,U can convert it in .exe and u can run that file using Selenium Webdriver .

Following is code to execute .exe file

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//Login

IWebDriver driver = new InternetExplorerDriver(@"C:\Users\Administrator\Documents\IEDriverServer_Win32_2.32.3");
driver.Navigate().GoToUrl("http://192.192.6.153/CRMPOC/main.aspx");
Thread.Sleep(4000);
Process.Start("C:\\Users\\Administrator\\Desktop\\http_IE8.exe");

}
}
}

Let me know if any queries. for more info please visit: selenium tutorial

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2017   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service