I am using selenium version 2.45 with internet explorer 11 and works well but i have problem in assert function and tr and catch they aren't included!!
so how can i start maybe i did something wrong btw i start with console application and added reference (Selenium WebDriver, Selenium WebDriver Support Classes, WebDriver-backed Selenium, Selenium Remote Control.)
if there is something wrong kindly tell me how can i start from first
-my code open google and search for amazon then open amazon and search for something invalid i want make it return that there is no data find so how can i search for text on page line "did not match" thanks in advance.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Diagnostics;
using System.Collections;
using OpenQA.Selenium;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Interactions;
class GoogleSuggest
{
static void Main(string[] args)
{
IWebDriver driver = new InternetExplorerDriver();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));
driver.Navigate().GoToUrl("http://www.google.com/");
driver.FindElement(By.Id("lst-ib")).SendKeys("amazon");
driver.FindElement(By.Id("lst-ib")).SendKeys(Keys.Enter);
driver.FindElement(By.ClassName("r")).Click();
driver.FindElement(By.Id("twotabsearchtextbox")).SendKeys("akajerhfbds bvksajhgrcbskhb");
driver.FindElement(By.Id("twotabsearchtextbox")).SendKeys(Keys.Enter);
Thread.Sleep(6000);
driver.Quit();
}
}