employer cover photo
employer logo
employer logo

Grepthor Software Solutions

Est-ce votre entreprise ?

Question d’entretien chez Grepthor Software Solutions

Parallel Execution in selemiun webdriver?

Réponse à la question d'entretien

Utilisateur anonyme

24 juin 2018

WebDriver driver; @Test(description="") @Parameters("browser") public void open(String browser) throws Exception{ if(browser.equals("Firefox")){ driver=new FirefoxDriver(); } else if(browser.equals("Chrome")){ System.setProperty("webdriver.chrome.driver", "D:\\seleniumdrivers\\chromedriver.exe"); driver=new ChromeDriver(); } else if(browser.equals("IE")){ System.setProperty("webdriver.ie.driver","D:\\selenium \\IEDriverServer.exe"); driver=new InternetExplorerDriver(); } driver.get(""); driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); driver.findElement(By.linkText("Login")).click(); Reporter.log("Click on Login Button"); driver.findElement(By.name("username")).sendKeys(""); Reporter.log("Enter UserName"); driver.findElement(By.name("password")).sendKeys(""); Reporter.log("Enter Password"); driver.findElement(By.id("loginsubmit")).click(); Reporter.log("Click on submit Button"); Thread.sleep(3000); System.out.println("open in firefox:"+driver.getTitle()); driver.findElement(By.linkText("")).click(); Reporter.log("Click on profile Button"); driver.findElement(By.linkText("Logout")).click(); Reporter.log("Click on logout Button"); }