Monday 14 March 2016

How to perform internationalization through selenium webdriver

How to perform internationalization through selenium webdriver:
==================================================
package enhancements;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

public class InternationDemo {

    public static void main(String[] args) {
       
        FirefoxProfile profile = new FirefoxProfile();
       
        profile.setPreference("intl.accept_languages","sl");


        WebDriver driver = new FirefoxDriver(profile); driver.get("http://www.google.com/");
       
        driver.findElement(By.name("q")).sendKeys("selenium");
       
        driver.findElement(By.name("btnG")).click();
       
       
    }
   
}

No comments:

Post a Comment