Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Solved:Unable to Locate Any Elements on Site

View previous topic View next topic Go down

Solved:Unable to Locate Any Elements on Site

Post by ccox on Tue Jan 29, 2013 5:04 am

I am using Visual Studio with Selenium Webdriver and NUnit and I am unable to interact with any element on a page for this site. Selenium IDE can interact with most of it, but Webdriver can't interact with any. I used the same code against Google it works as expected so I know its not a set up error.

This is the html:


This is the command I use:
driver.FindElement(By.Id("txtDisplayName")).SendKeys("Display Name");

This is the error:
TestSelenium.Class1.AddClass:
OpenQA.Selenium.NoSuchElementException : Unable to find element with id == txtDisplayName

This is the log
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 983
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 844
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 873
at OpenQA.Selenium.By.FindElement(ISearchContext context) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\By.cs:line 306
at TestSelenium.Class1.AddClass() in C:\Users\MyDocuments\Documents\Visual Studio 2010\Projects\TestSelenium\TestSelenium\Class1.cs:line 31


Last edited by ccox on Mon Feb 04, 2013 8:18 am; edited 1 time in total

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Solved:Unable to Locate Any Elements on Site

Post by ccox on Wed Jan 30, 2013 11:18 pm

Solved. If there is an iframe on the page, Webdriver has issues with location an element within that I frame. You have to switch to the iframe to find those elements and then switch back to the default content.

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Solved:Unable to Locate Any Elements on Site

Post by vinayakjadhav1857 on Mon Apr 22, 2013 1:52 pm

hey ccox,

what abt selecting multiple windows ?

vinayakjadhav1857
Active particpant
Active particpant

Posts : 19
Join date : 2013-04-22

Back to top Go down

Re: Solved:Unable to Locate Any Elements on Site

Post by ccox on Mon Apr 22, 2013 9:28 pm

driver.SwitchTo().Window("windowname");

If you do not know the window name/id you will need to use its handle.

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Solved:Unable to Locate Any Elements on Site

Post by Sponsored content Today at 8:10 am


Sponsored content


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