QTP Patches

Recently I had to work with version 11 of QTP. I ran into problems that I was not able to identify objects in Internet Explorer 8.
First thing I thought is, why IE8? But is was something the whole company still used. Although some people used the standalone version of Firefox.
Back to the problem. After searching the web i found the following link: http://sumitkumarshrivastava.blogspot.se/2012/10/qtp-11-error-not-able-to-identify-ie8.html.
Unfortunatly it was not possible to download the needed updates/patches directly. No username and password where available at that time. To solve this I used this: http://para.ms/index.php/locator/search/hpp/QTPWEB_00078 . At the end you place the patch that you want and open it in a browser. It does not work for all patches, but I was able to get the important ones and continue working with QTP 11.
Aside

Selenium and changing elements

My application under test has a very nice feature. When a page loads, 3 listboxes are shown and at least 4 input fields. When the last lisbox is changed, it triggers some code. The remaining input fields are changed to listboxes. Ofcourse these new Listboxes have the same ID as the Input fields.

The first problem I encouterd is what happens exactly. With Selenium I got several error messages that did not give me a clue of what had happened. There was a message that the specified field was an Input instead of a Select. Another was that the element was not available any more.

I tried to solve it by trying to wait for the select element, but that didn’t work because the Input field had the same ID as the Select. The name property was not filled in. Then I added a check if the specified field was of the class Select. At first it did not work, but after seperating them it did. Below is the code:

int a = 0;
while(a == 0) {
if(driver.findElement( By.id(tfTemp.getID()) ).getTagName().equalsIgnoreCase("select")) {
a = 1;
}
}

while(ExpectedConditions.presenceOfElementLocated( By.id(tfTemp.getID()) ) == null ) {
//...
}

For now this works, but if you have a better idea, please do not hesitate to contact me. Also I have only tested this with Internet Explorer 10.

@Edit:
After thinking this over (again), I changed the order. First wait until you find a SELECT, then wait if it is visible.

Selenium and changing elements