Posts

Showing posts from August, 2012

Selenium Webdriver 2 Wait /Sleep for time period/wait next step execution/ Set speed for next execution

Some times we have to wait while running the script like for next execution wait for specific duration.But in web driver 2, I did not find the simple way to wait for next step execution after that I have decided to use simplest way to wait in looping statement. I have created a method just call the method with waiting time in seconds.It will wait for given time period.

Handling Security Cerificates(UntrustedSSLCertificates) using WebDriver(selenium2)

Handling Security Cerificates(UntrustedSSLCertificates) in Internet Explorer (IE) using WebDriver(selenium2) driver = new InternetExplorerDriver(); driver.navigate().to("javascript:document.getElementById('overridelink').click()"); // or using selenium rc selenium.runScript("document.getElementById('overridelink').click()"); Handling Security Cerificates(UntrustedSSLCertificates) in Firefox using WebDriver(selenium2)

Set cookies with domain using webdriver

using web driver I have created the script for adding the cookies using domain. Basically here is the things that you must know first open the URL then add the cookies after that again open the URL now it will add.  ______________________________________________________ package webdriver; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.support.ui.Select; public class RuntestCase {     /**      * @param args      */     public static void main(String[] args) {         // TODO Auto-generated method stub           ...