Showing posts with label selenium testing. Show all posts
Showing posts with label selenium testing. 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...
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...
Read more...

Press Enter Key in Selenium

If you are working with a SearchBox using Selenium. In which you have to type something and you have to press Enter to search. You can do it in the following way... // this sends an Enter to the element selenium.type("locator", Keys.ENTER); // The below code sends the "Any text" and then confirms it with Enter selenium.type("locator", "Any text" + Keys.ENTER); Here locator means You have...
Read more...

Sending email with attachments from C#

In many cases you may required to send emails using ASP.NET. You can have all the classes required to send an email in the System.Net.Mail namespace. You can send an email from ASP.NET as follows : First you have to add these namespaces to your code behind file: 1. using System.Net; 2. using System.Net.Mail; Then write the following method public void email_send() { MailMessage mail = new MailMessage(); SmtpClient...
Read more...

No connection could be made because the target machine actively refused it 127.0.0.1:4444

I had this issue and it took a lot of time to find the solution for this. I searched many sites for the solutions. After few hours, i have found the solution for this issue. (This is the solution which worked for me . I hope this will work for others also.) The problem is i din't start the selenium server. After starting the server, issue...
Read more...