Showing posts with label selenium webdriver. Show all posts
Showing posts with label selenium webdriver. Show all posts

The type or namespace name 'NUnit' could not be found

If you are new to selenium rc/ selenium webdriver and when you run your code you may see these types of errors

The type or namespace name 'NUnit' could not be found.

The type or namespace name 'TestFixture' could not be found

The type or namespace name 'ISelenium' could not be found

The type or namespace name 'SetUpAttribute' could not be found

If you are getting the above errors, It means you have not added required dll's to your project.

So add the following dll's to your project

nmock.dll
nunit.core.dll
nunit. framework.dll
ThoughtWorks.Selenium.Core.dll
ThoughtWorks.Selenium.IntegrationTests.dll and
ThoughtWorks.Selenium.UnitTests.dll

To add the above dll's --> right click on reference in the solution explorer and select add reference and browse for the required dll.

The NUNIT dll's can be downloaded from the NUNIT website. http://www.nunit.org/index.php?p=download

And the dll's related to selenium can be downloaded from http://docs.seleniumhq.org/download/


Hope this post helps you.

For more posts related to selenium rc/selenium Webdriver See this : Selenium RC/ Selenium Webdriver


Read more...

Selenium waitforpopup


How to stop the selenium server until a popup opens?
We have selenium.waitForPageToLoad to stop the server until the Page Loads. But is there any way to stop it for Popup?
If you are dealing with a direct popup then You can use 
selenium.WaitForPopUp("id=popup_container", "30000");

to stop the server until popup Opens. 

But what will you do if your popup is a div tag like seen in this  DEMO?


If your 'popup' is not actually a popup, it's just a div tag. So you have to wait until that element (div tag) is present. There is a method to check if the element is present:
selenium.IsElementPresent("div_id_of_the_popup");
This is the way to stop the selenium server until a div_popup Opens.
Read more...