Am getting error while the run the code

552 views
Skip to first unread message

Sathia Narayanan

unread,
Sep 1, 2016, 7:57:50 AM9/1/16
to Selenium Users
Code:

package TestPackage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Testclass {

public static void main(String[] args) throws InterruptedException {
// TODO Auto-generated method stub
System.setProperty(".Chrome.driver","C:\\ProgramFiles(x86)\\Google\\Chrome\\Application\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com/");
//driver.manage().Window().maximize();
//driver.findElement(By.id("lst-ib")).sendKeys("Software Testing");
//driver.findElement(By.className("sbico")).click();
//Thread.sleep(3000);
//driver.findElement(By.className("r")).click();
//driver.navigate().back();
 }

After running this code, am getting below error:

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 14926 Only local connections are allowed. Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"824.1","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=54.0.2840.6) (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 2.51 seconds Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700' System info: host: 'TECHNO', ip: '192.168.1.7', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_101' Driver info: org.openqa.selenium.chrome.ChromeDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:683) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116) at TestPackage.Testclass.main(Testclass.java:11)

Kindly help me to fix
OS - Windows 8.1 (64 bit)
Eclipse - 4.6
Chrome - 54.0.2840.6 dev-m (64-bit)


kadiyal...@gmail.com

unread,
Sep 2, 2016, 2:22:03 PM9/2/16
to Selenium Users
public static void main(String[] args) throws InterruptedException {
// TODO Auto-generated method stub
WebDriver driver = null;
System.setProperty("webdriver.chrome.driver",
"C://QA/Automation/chromedriver.exe");
driver = new ChromeDriver();
driver.get("https://www.google.com/");
//driver.manage().Window().maximize();
//driver.findElement(By.id("lst-ib")).sendKeys("Software Testing");
//driver.findElement(By.className("sbico")).click();
//Thread.sleep(3000);
//driver.findElement(By.className("r")).click();
//driver.navigate().back();
}

Sri

unread,
Dec 14, 2017, 1:16:14 PM12/14/17
to Selenium Users
I'm facing the same issue. Can anyone help me with this issue pls. I downloaded latest version on chrome 2.34. But doesn't help me.

Thank You
Reply all
Reply to author
Forward
0 new messages