This is sample code for buying MI ( Xiaomi ) Phone using selenium scripts on Flipkart. Things to keep in mind : Find working ( as today : 30/12/14 ) visual studio project here : Download You will need chrome installed on your system In this project we have used reference to selenium webdriver. If Flipkart change Tag name or Class name in future, We may need to change accordingly. Current html for 'Buy Now' button is included in code. using System ; using System.Collections.Generic ; using System.Linq ; using System.Text ; using OpenQA.Selenium ; using OpenQA.Selenium.Chrome ; namespace BuyMIPhoneFlipkartScripted { class Program { static void Main ( string [] args) { ChromeOptions options = new ChromeOptions(); options.AddArgument( "--start-maximized" ); IWebDriver driver = new ChromeDriver(options); // This Will Login Into FLipkart driver.Navigate().GoT...
Code written manually for newbs