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

Using clear() to remove pre-filled text sends IE window to the background #3402

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

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 3402

Issue: Using clear() to remove pre-filled text minimizes IE 8 and IE 9.

What steps will reproduce the problem?
1. Run ClearingTextFieldMinimizesIE.java against IE 8 and IE 9. This class will demonstrate
IE 8 and IE 9 minimizing when clear() is called.

Here is the code

WebDriver ie = new InternetExplorerDriver();
ie.navigate().to("http://finance.yahoo.com/");
WebElement textField = ie.findElement(By.id("txtQuotes"));
textField.clear();  # IE 8 and IE 9 minimize at this point.
textField.sendKeys("BAC");

2. Run BrowserDoesNotMinimizeExample.java against IE 8 and IE 9. This class will demonstrate
IE 8 and IE 9 remaining maximized.

What is the expected output? What do you see instead?
For # 1 expecting the pre-filled text to clear and for the browser to remain visible.

Selenium version: 2.17.0
OS: Windows & Pro
Browser: Internet Explorer
Browser version: 8 and 9


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!

Reported by mountain1228 on 2012-02-20 22:38:05


- _Attachment: [ClearingTextFieldMinimizesIE.java](https://storage.googleapis.com/google-code-attachments/selenium/issue-3402/comment-0/ClearingTextFieldMinimizesIE.java)_ - _Attachment: [BrowserDoesNotMinimizeExample.java](https://storage.googleapis.com/google-code-attachments/selenium/issue-3402/comment-0/BrowserDoesNotMinimizeExample.java)_
@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

This does not match up with what I'm seeing at all. True, the browser does get sent
to the bottom of the Z-order (that is, it appears to be sent to the bottom of the stack
of open windows), but it doesn't get minimized in my environment. Are you sure you
mean that it minimizes the window to the task bar?

Reported by james.h.evans.jr on 2012-03-04 21:14:22

  • Status changed: NeedsClarification

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi James. 

What I am seeing is when you remove pre-filled text using clear(), the browser behaves
like you have clicked the IE minimize button. The workaround is to clear the text using
JavaScript. Also my Windows instances are all VirtualBox VM's, not sure if this makes
a difference or not.

Thank you for your response,

Sincerely,

James Davis

Reported by mountain1228 on 2012-03-05 00:25:21

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Also seeing this bug in Selenium 2.20 on Win7x64 with IE9.

yes the window is actually being sent to the tray, minimized, not just underneath other
windows.

Seems to only happen on the first load of webdriver. Example:
<input id='my_id' value='123'></input>

ele = blah blah by id # get the ele
ele.clear()           # minimizes the window
driver.refresh()      # let's try it again
ele = blah blah by id # get the ele again
ele.clear()           # this time does NTO minimize the window

Reported by sean.grider on 2012-03-27 17:13:35

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Can someone please tell me, then, how to reproduce the issue? I simply cannot do so
in any IE environment I try. I've used the Yahoo Finance link referenced in the initial
report. I've used a simple HTML page consisting of the following:

<html><head><title>SimplePage</title><head><body><input id='my_id' value='123'></input></body></html>

For the latter case, my WebDriver code (C#) looks as follows:

IWebDriver driver = new InternetExplorerDriver();
driver.Url = "http://localhost/test.html";
IWebElement element = driver.FindElement(By.Id("my_id"));
element.Clear();

In no case have I ever been able to get the browser window to minimize. I do see it
thrown to the bottom of the Z-order, but not actually minimized. There's clearly something
going on here, but I can't fix what I can't diagnose.

Reported by james.h.evans.jr on 2012-03-27 23:18:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

To replicate please add an XHTML DOCTYPE to the top of your html or run the attached
html file. 

I ask because when I added an XHTML DTD (strict or transitional) I was able to replicate
consistently. If you remove the XHTML declaration then you will not be able to replicate
at all.

Hope this helps, if you need more information please let me know and I will dig in
further. 

James Davis

Reported by mountain1228 on 2012-03-28 14:44:05


- _Attachment: [samplexhtml.html](https://storage.googleapis.com/google-code-attachments/selenium/issue-3402/comment-5/samplexhtml.html)_

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

No, I'm sorry, adding a DOCTYPE directive doesn't allow me to reproduce the problem.
I'm still seeing it drop to the bottom of the Z-order, but not minimize to the taskbar.

Reported by james.h.evans.jr on 2012-03-28 15:45:55

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I have run the below test against IE 8 on both a Windows XP Home and Windows 7 system,
IE 9 on Windows 7 system. For the tests run against IE 8, regardless of OS, the browser
was never minimized to the tray. With IE 9 the browser was minimized to the tray.

String page = "http://localhost/samplexhtml.html";

WebDriver ie = new InternetExplorerDriver();
ie.navigate().to(page);
WebElement textField = ie.findElement(By.id("my_id"));
textField.clear();

try {
  Thread.currentThread().sleep(ms);
} catch (InterruptedException e) {
  //
}

ie.close();

I will run the above test against the below OS/IE versions and update the ticket accordingly.
If you still cannot replicate against both IE 8 or IE 9 then maybe the Virtualization
application (Open Source VirtualBox) is the problem.

Windows Vista - IE 8
Windows Vista - IE 9
Win XP Pro - IE 8

Reported by mountain1228 on 2012-03-28 19:50:53

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I'm running IE9 (32-bit and 64-bit) on Windows 7 x64, using a VirtualBox VM. The browser
never minimizes. Ever. Not in my environment. I suppose it's possible that there's
a language binding difference causing the problem, but I've tried it both with the
.NET bindings and the Ruby bindings (I'm not set up to try it with the Java bindings),
and can't seem to reproduce the behavior you're seeing.

Reported by james.h.evans.jr on 2012-03-29 14:58:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

@8 After it happens, when happens when you click on the IE entry in the task bar each
of: once, twice, and three times?

Reported by dawagner on 2012-03-29 15:07:26

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by dawagner on 2012-03-29 15:07:35

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Minimizing the window in my case does not actually affect the test run, it's only an
annoyance that I can't see it anymore. Clicking the taskbar manually does restore the
window's state so that I can watch it.

Reported by sean.grider on 2012-03-29 15:44:01

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Dawagner thank you for your test case. It has helped clarify what was meant by the browser
going to the bottom of the Z-order. Because I had other apps that were fully maximized
open when running the test case, visually the browser appeared to be minimizing to
the tray when in fact it was not. 

So never mind the minimize comments. The ticket description should be renamed "Using
clear() to remove pre-filled text moves IE to the bottom of the Z-order".

Thanks everyone for your time and sorry for the misunderstanding.

Reported by mountain1228 on 2012-03-29 16:42:49

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-05-11 16:46:49

  • Labels added: Component-WebDriver, Browser-IE

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Issue 4532 has been merged into this issue.

Reported by james.h.evans.jr on 2012-09-10 15:03:35

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by james.h.evans.jr on 2012-09-10 15:04:38

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Please retest in 2.28, this issue must be fixed by r18080

Reported by barancev on 2012-12-13 00:12:29

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Will do shortly

Reported by sean.grider on 2012-12-13 00:14:22

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

After deploying webdriver 2.28 I ran the attached test cases and was unable to replicate.
My OS is Win7Pro. The test was ran against IE 9. Thank you WebDriver team for your
help!! WebDriver rules!!!!

Reported by mountain1228 on 2012-12-18 20:27:46

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Fixed by r18080.

Reported by james.h.evans.jr on 2012-12-18 20:36:26

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:14:49

  • 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