adityasrinivasb Absent Member.
Absent Member.
892 views

QTP handling of a WebCombo box

Hi 

I am writing scripts for a web application which has some combo boxes in it. The combo box is a combination of a editbox plus the select icon to its right which when clicked gives me a list of options in a drop down. I attached the screenshot of the combo box.  The problem is QTP recognizes this as a webedit and uses the set method on it. The set method does not work for me when my application stores the values in the combo boxes as enums (short form) in the DB. For ex: In the drop down it shows as Internet Explorer but in DB it is stored as IE. So when I use Browser("app").Page("app").WebEdit("A").Set "Internet Explorer", the app throws an exception. This is different when we do the selection in the combo manually. When we select an option manually in the combo box, a conversion to enum happens before it reaches the DB

It works if I directly use the enums like WebEdit("A").Set "IE". But I should know the enums of loads of combo boxes that exist in my app. 

Mine is an extjs application for which we developed a custom QTP add-in. Should I ask the developer to create another control called as extjscombobox and implement the select method on it so that QTP can do selections on the combo boxes? Please advise

Regards
Srinivas

0 Likes
4 Replies
Murari9 Absent Member.
Absent Member.

Re: QTP handling of a WebCombo box

How the drop down items are getting recognized??

0 Likes
rameshtt Absent Member.
Absent Member.

Re: QTP handling of a WebCombo box

Hi srinivas,

 

These are ExtJs control i think, you can handle by WebElement as the parents and remaining inside this as the standard control.

 

Eg 

Browser(),Page(),WebElement()Image().fireevent 'OnClick"

wait(3)

Browser(),Page(),WebElement().webcheckbox().set "ON"

 

Use DP to avoid runtime error if the object are Extjs.

 

 

Thanks,

Ramesh

0 Likes
Ruban_Chakk Absent Member.
Absent Member.

Re: QTP handling of a WebCombo box

Hi Srini,

Can u post the html code of the combobox? If possible we can try to fix it with DOM.

0 Likes
adityasrinivasb Absent Member.
Absent Member.

Re: QTP handling of a WebCombo box

Each option in the dropdown is recognized as a ExtSelectionItem control by QTP. This is a custom control we put in the addin. Each item in the dropdown is ExtSelectionItem and operation on it is ExtSelectionItem("Option1").click. This will select the first option in the dropdown.

 

Regards

Srinivas

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.