Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Timeout awaiting keypress and Key up failed in IE 10 #4261

Closed
lukeis opened this issue Mar 3, 2016 · 9 comments
Closed

Timeout awaiting keypress and Key up failed in IE 10 #4261

lukeis opened this issue Mar 3, 2016 · 9 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 4261

I am executing the below code in Windows 7 and IE9 which works fine.
I am executing the same code in Windows 8 and IE10 but it shows up

Error:

The path to the driver executable must be set by the webdriver.ie.driver system property;
for more information, see http://code.google.com/p/selenium/wiki/InternetExplorerDriver.
The latest version can be downloaded from http://code.google.com/p/selenium/downloads/list
Jul 16, 2012 7:10:25 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software
caused connection abort: recv failed
Jul 16, 2012 7:10:25 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
[TestNG] Running:
  C:\Users\Vinod\AppData\Local\Temp\testng-eclipse--206624950\testng-customsuite.xml

BeforeMethod
Test
AfterMethod
Timeout awaiting keypress: 67
Timeout awaiting keypress: 72
Key up failed: 1400
Key down failed: 1400
Timeout awaiting keypress: 65
Key up failed: 1400
Key down failed: 1400
Timeout awaiting keypress: 83
Key up failed: 1400
Key down failed: 1400
Timeout awaiting keypress: 69
Key up failed: 1400
PASSED: opengoogle


Code:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.Wait;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class PageOne {
    static WebDriver driver = new InternetExplorerDriver();
    static Wait<WebDriver> wait;

    @BeforeMethod
    public static void setup() {
        System.out.println("BeforeMethod");
        wait = new WebDriverWait(driver, 300);
    }

    @Test
    public void opengoogle() {
        System.out.println("Test");
        driver.get("http://www.google.com/");
        wait = new WebDriverWait(driver, 300);
    }

    @AfterMethod
    public void cleanUp() {
        System.out.println("AfterMethod");
        WebElement element = driver.findElement(By.xpath("//INPUT[@name='q']"));

        element.sendKeys("Yahoo");
    }
}

Please help me with the issue.

Reported by vinod.raajasekaran on 2012-07-16 23:20:13

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-07-17 09:07:13

  • Labels added: Component-WebDriver, Browser-IE

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Have the same issue. Win2008R2 + IE9.
After SenKeys. BUT! Some keys are really sent.

Reported by isx1ntrvr on 2012-10-12 14:09:19

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Having the same issue with Window 7 + IE 10.  Have tried both the 32 and the 64 bit
drivers but to no avail.

Reported by smarshall%e-mds.com@gtempaccount.com on 2013-05-06 14:47:47

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi!

Sorry but i can not reproduce your issue at my Win7, IE10, selenium 2.32
Test case and IEdriverserver logs (for x32 and x64 cases) are attached.

For IE10 x32 all works fine - correctly and fast.
For IE10 x64 all works but really slow - this issue is already well known - see #3072
and #5116 (some another are existed, i think).

Please specify which IE do you use - x32 or x64.

Also initial poster and other commenters: Please specify your selenium version, test
reproduction scenario.

Also it'd be great if you attach TRACE log from IEDriverServer.


At this point this issue looks like duplicate of #3072.

Reported by a.u.savchuk on 2013-05-07 08:06:29

  • Status changed: NeedsClarification

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Attached missed files.

Reported by a.u.savchuk on 2013-05-07 08:07:51


- _Attachment: [t.py](https://storage.googleapis.com/google-code-attachments/selenium/issue-4261/comment-5/t.py)_ - _Attachment: [t1.log](https://storage.googleapis.com/google-code-attachments/selenium/issue-4261/comment-5/t1.log)_ - _Attachment: [t2.log](https://storage.googleapis.com/google-code-attachments/selenium/issue-4261/comment-5/t2.log)_

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I'm using IE version 10.0.9200.16540.  Update Version 10.0.4 (KB2817183) 32 bit with
the 32 bit IEServerDriver.
Selenium-server-standalone-2.32.0.jar.
Using Netbeans IDE 7.3

This is a script that we utilized in the past utilizing XP and the script runs well.
 Now we have upgraded the standalone jar and to 64 bit windows 7 I'm experiencing the
 time out issue with each key stroke.  I'm not seeing any exceptions being thrown by
the driver (albeit I'm not sure I'm looking in the right place) but I do see the timeouts
in the Debugger console.

Yesterday I started playing with the new IE driver in the Selenium IDE and am not seeing
the issue there; however, we would rather create a jar file that we are running on
our Excel DDT type system so we do need this issue addressed.  Below is the code snippet
for the sendKeys function:

    public static void vSendKeys(String findBy, String elem, Cell cell) throws Exception
{
        String mydelims = "";
        Integer iItem = 0;
        WebElement element;

        try {
            if(elem.contains(",")) {
                if(elem.contains(", ")) {
                    mydelims = "[, ]+";
                } else {
                    mydelims = "[,]+";
                }
                String delims = mydelims;
                String tokens[] = elem.split(delims);

                iItem = Integer.parseInt(tokens[1]);
                elem = tokens[0];
            }
            cData = getStrVal(cell);
            cData = cData.trim();
            if(findBy.equalsIgnoreCase("name") || findBy.equalsIgnoreCase("id")) {
                if(iItem == 0) {
                    element = driver.findElement(By.xpath("//input[@" + findBy.toLowerCase()
+ "='" + elem + "']"));
                } else {
                    element = driver.findElement(By.xpath("(//input[@" + findBy.toLowerCase()
+ "='"+ elem + "'])[" + iItem + "]"));
                }
                element.click();
                element.sendKeys(Keys.BACK_SPACE);
                element.clear();
                element.sendKeys(cData);
            } else {
                logFile.write("unsupported findBy specified in step:  " + findBy +
"\n");
                logFile.flush();
            }
        }
        catch(Exception e) {
            logFile.write("     ERROR:  vSendKeys failed \n");
            StringWriter errors = new StringWriter();
            e.printStackTrace(new PrintWriter(errors));
            logFile.write(errors.toString() + "\n");
            logFile.flush();
            logFile.write("  Trying again \n");
            Thread.sleep(3000L);
        }
    }

Reported by smarshall%e-mds.com@gtempaccount.com on 2013-05-07 18:28:24

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi!

Please provide exception info,
public URL or HTML+CSS+JS of page at which problem is occured
and executable test scenario (not code snippet) with all test inputs.

Reported by a.u.savchuk on 2013-05-08 07:38:42

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Closing the issue as there is no reporoduction case.

Reported by barancev on 2013-10-18 22:20:03

  • Status changed: Invalid
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:15:47

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant