Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot focus element in GC V52 with Selenium 3.0.0Beta2 #2617

Closed
kumarTech16 opened this issue Aug 17, 2016 · 0 comments
Closed

cannot focus element in GC V52 with Selenium 3.0.0Beta2 #2617

kumarTech16 opened this issue Aug 17, 2016 · 0 comments

Comments

@kumarTech16
Copy link

kumarTech16 commented Aug 17, 2016

Meta - Caused by: org.openqa.selenium.WebDriverException: unknown error: cannot focus element

OS: Win 7x64

Selenium V 3.0.0 Beta 2, JDK 8U102

Browser Version: GC V52
Logged issue in GC: [https://bugs.chromium.org/p/chromedriver/issues/detail?id=1468]

Expected Behavior - The JAR file created to create a story in JIRA tool should run in GC V52 with Selenium 3.0.0Beta2

Actual Behavior - The execution fails with below exception:

C:\Automation\JiraStory>java -jar story1.jar
Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on
port 14846
Only local connections are allowed.
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: org.openqa.selenium.WebDriverException: unknown error: cannot focus e
lement
  (Session info: chrome=52.0.2743.116)
  (Driver info: chromedriver=2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef9
61),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any
stacktrace information)
Command duration or timeout: 439 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'IE3BLT81BLG32', ip: '10.77.9.75', os.name: 'Windows 7', os.a
rch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEn
abled=false, chrome={userDataDir=C:\Users\e867098\AppData\Local\Temp\scoped_dir9
168_21777}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, h
asTouchScreen=false, version=52.0.2743.116, platform=XP, browserConnectionEnable
d=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, we
bStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnable
d=true, cssSelectorsEnabled=true}]
Session ID: 950e501ee92a1e77c15be2267cee6e11
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        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(ErrorHa
ndler.java:158)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.ja
va:683)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.
java:319)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement
.java:122)
        at niagara4.JiraStory.main(JiraStory.java:61)
        ... 5 more

C:\Automation\JiraStory>

Steps to reproduce -

Automate the process to create a story using JIRA tool with IDE. Generate a JAR file (executable file) from the script.
Execute this JAR file from other PC where IDE or any other Selenium modules are not available/installed.
Execute the JAR file from command promt, observe the process fails after few steps. In my case the login was successful however after selecting a component called 'Story', failed to select it.
Refer piece of code below:

System.setProperty("webdriver.chrome.driver", "C:\\Automation\\softwares\\chromedriver_win32\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
driver.get(data00);
WebElement uswb = driver.findElement(By.xpath("//input[@id='login-form-username']"));
uswb.sendKeys(data01);
WebElement pswd = driver.findElement(By.id("login-form-password"));
pswd.sendKeys(data02);  
driver.findElement(By.xpath("//input[@id='login']")).click();
driver.findElement(By.xpath("//a[@href='/secure/CreateIssue!default.jspa']")).click();
driver.findElement(By.xpath("//input[@id='issuetype-field']")).clear();
driver.findElement(By.xpath("//input[@id='issuetype-field']")).sendKeys("Story");
Actions act=new Actions(driver);
act.sendKeys(Keys.ENTER).perform();
Thread.sleep(5000);
driver.findElement(By.xpath("//input[@id='summary']")).sendKeys(data03);
@lukeis lukeis closed this as completed Oct 1, 2016
@lock lock bot locked and limited conversation to collaborators Aug 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants