Dhomaseghanshyam.files.wordpress.com



Login to linkedinSeleniumpackage snjb1;import java.util.HashMap;import java.util.concurrent.TimeUnit;import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import org.openqa.selenium.chrome.ChromeDriver;import org.openqa.selenium.chrome.ChromeOptions;import com.gargoylesoftware.htmlunit.javascript.host.Map; public class Mac { WebDriver driver; public Mac() { //Map<String, Object> prefs = new HashMap<String, Object>(); // Set the notification setting it will override the default setting //prefs.put("profile.default_content_setting_values.notifications", 2); // Create object of ChromeOption class ChromeOptions options = new ChromeOptions(); // Set the experimental option//options.setExperimentalOption("prefs", prefs); System.setProperty("webdriver.chrome.driver", "H:\\ec\\chromedriver.exe"); driver = new ChromeDriver(); //driver=new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);//"" driver.get("");// driver.manage().window().maximize();}public void select(){driver.get("");driver.findElement(By.xpath("//*[@id=\"session_keylogin\"]")).sendKeys("abc@");driver.findElement(By.xpath("//*[@id=\"session_password-login\"]")).sendKeys("password");driver.findElement(By.xpath("//*[@id=\"btn-primary\"]")).click();}public static void main(String[] args) {// TODO Auto-generated method stub new Mac().select(); }} ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download