Display results as :

Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c


OpenQA.Selenium.NoSuchElementException : Unable to find element

View previous topic View next topic Go down

OpenQA.Selenium.NoSuchElementException : Unable to find element

Post by Djaved on Thu Feb 16, 2012 7:37 pm

Hi All,

When running the following test, im getting the 'NoSuchElementException' in this code line: driver.FindElement(By.LinkText("exact:Wachtwoord vergeten?")).Click();

There are no proxy servers setted in my browsers.
I also tried to set a timeout after driver.Navigate().GoToUrl(baseURL + "/Account/LogOn?"); to wait for 10 sencods before running driver.FindElement(By.LinkText("exact:Wachtwoord vergeten?")).Click();
but still not the same error.

When running the same testcase through RC, it works great.
What is going on here and how can i fix this ? please some advice.

This is my entire code

using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;

namespace SeleniumTests
public class Untitled
private IWebDriver driver;
private StringBuilder verificationErrors;
private string baseURL;

public void SetupTest()
driver = new FirefoxDriver();
baseURL = "";
verificationErrors = new StringBuilder();

public void TeardownTest()
catch (Exception)
// Ignore errors if unable to close the browser
Assert.AreEqual("", verificationErrors.ToString());

public void TheUntitledTest()
driver.Navigate().GoToUrl(baseURL + "/Account/LogOn");
driver.FindElement(By.LinkText("exact:Forget your password?")).Click();
private bool IsElementPresent(By by)
return true;
catch (NoSuchElementException)
return false;


Posts : 5
Join date : 2012-02-14

Back to top Go down

Re: OpenQA.Selenium.NoSuchElementException : Unable to find element

Post by zlos7ar on Thu Feb 16, 2012 11:15 pm

try driver.findElement(By.xpath("//......."))

to find the XPath you need firebug and FirePath (its firebug extension mine is version 0.9.7)


Posts : 41
Join date : 2012-01-13
Age : 28
Location : Germany

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum