RE: A Problem debuging simple code with selenium webdriver

I m start development with “Keyword Driven Framework” and when I run the line bellow occurs error and I not know a solution.

I follow step by step the example onĀ http://www.toolsqa.com/selenium-webdriver/keyword-driven-framework/introduction/.

driver = new ChromeDriver();

Error:
” Source not found” the source attachment does not contain the source for the file Preconditions.class.

complete code bellow:


package executionEngine;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

//import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.chrome.ChromeDriver;
public class DriverScript {

private static WebDriver driver = null;

public static void main(String[] args) {
//driver = new FirefoxDriver();

System.setProperty("webdrive.chrome.driver", "C:/Users/joliena/workspace/eclipse-keller/KeywordDrivenFramework-Keller/jars/chromedriver_win32/chromedriver.exe");
driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

driver.get("http://www.store.demoqa.com");
driver.findElement(By.xpath(".//*[@id='account']/a")).click();

driver.findElement(By.id("log")).sendKeys("testuser_3");

driver.findElement(By.id("pwd")).sendKeys("Test@123");

driver.findElement(By.id("login")).click();

driver.findElement (By.xpath(".//*[@id='account_logout']/a")).click();

driver.quit();

}

}

jviegas Default Asked on October 13, 2014 in Selenium WebDriver.
Add Comment
3 Answers

Hi jviegas,

This seems to work for me. Can you try downloading the latest version of Chromedriver.exe from the below link.

http://chromedriver.storage.googleapis.com/index.html?path=2.9/

Thanks,
Vishal

Doctor Answered on October 14, 2014.

Thanks Vishal

on October 14, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.