Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watir Webdriver Text Input Slow on IE

I'm using Cucumber and Watir-Webdriver to create some automated tests. I am also using the PageObject gem. Some Example code is below

require 'page-object'

class LoginPage
    include PageObject

    text_field(:username, :name => 'username')
    text_field(:password, :name => 'password')
    link(:login, :text => 'SIGN IN')
end

browser = Watir::Browser.new
browser.goto "MyWebAppLoginScreen"
login_page = LoginPage.new(browser)
login_page.username="MyUserName"
login_page.password="MyPass"
login_page.login

The Problem that I'm seeing is that it takes a really long time to input the text into the username/password fields in IE (Version 11). I have also tested with Firefox and Chrome and the text is input immediately. In IE, however, it enters the text character by character and each character takes roughly 10 - 15 seconds to be put in. This drastically slows down the runtime of my tests in IE. Has anyone else encountered this? Any ideas on how to fix it? I tried using the browser.speed = :zippy option but this does not seem to help.

like image 613
Nathan24 Avatar asked Feb 13 '23 13:02

Nathan24


2 Answers

Yeah it is the 64 bit IEDriverServer. Something about IE's content handling and other technical jargon. But I deleted the 64 bit driver and downloaded the 32 bit one and now it is working just as well as chrome and firefox. Here is a link to all the files.

http://selenium-release.storage.googleapis.com/index.html

Also note for work reasons I am using IE10 but its something to try if your on IE11

like image 100
TooSuspiciousToSignUpDan Avatar answered May 01 '23 08:05

TooSuspiciousToSignUpDan


Thanks @TooSuspiciousToSignUpD your given solution work like a charm with IE 11 as well.

Steps to follow:

  1. Install IE 11 (Windows 7 64 bit version, don't download Developer / windows server 2008 version, you can find offline download of Windows 7 64 bit version from Microsoft site through google)

  2. go to link as given by @TooSuspiciousToSignUpD (http://selenium-release.storage.googleapis.com/index.html)

  3. Click on "2.45" folder

  4. Download IEDriverServer Win32 2.45.0.zip

  5. unzip and put into your PATH (where original IEDriver is located, replace it with above)

  6. run your script, it will work fast with Input text

like image 34
DevB Avatar answered May 01 '23 06:05

DevB