Display results as :

Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara


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 : 29
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