3

My project is completely developed in ExtJs language(not in html).

Please observe the following code and I attached screenshot of my window. I want the combo box item(activePoll server1) to get selected as shown in the figure. Please suggest.

Option explicit
Dim bro,url
bro="C:\Program Files\Internet Explorer\iexplore.exe"
url="-------------------------------------------------------"
invokeapplication(bro&" "&url)
With Browser("Certificate Error: Navigation")
With   .Page("Certificate Error: Navigation")
            .Link("Continue to this website").Click
End With
End With
With Browser("Title:=WebiPer.*.*")
With    .Page("title:=WebiPer.*")
    .WebEdit("name:=userName").Set "Sai"
    .WebEdit("name:=password").Set "Admin123"
       .WebList("name:=loginType").Select "ManagementApps"
    .WebButton("name:=Login").Click
End With
End With
With Browser("Title:=APS Configuration Client")
With    .Page("title:=APS Configuration Client")
        .WebEdit("name:=Image").Set"activePollServer1"
End With
End With

enter image description here

David
  • 72,686
  • 18
  • 132
  • 173
Sai
  • 31
  • 1
  • 3
  • 1
    Please clarify what the problem is, does the `WebEdit.Set` work and you expect the test object to be of type `WebList` or does the `WebEdit.Set` not work? – Motti Sep 13 '12 at 06:27
  • Thaks for your response. The problem is with ExtJs combo box. qtp script is not recognizing the combo box object.That's it. Please let me know if you know how to make the combo box object recognizable. Laeave about the html terminology. – Sai Sep 13 '12 at 06:47
  • I'm sorry I still don't understand the exact nature of your problem – Motti Sep 13 '12 at 07:22
  • How to automate ExtJS based application using HP Quick Test Pro.Its identifying ExtJS combo box as image. – Sai Sep 13 '12 at 07:54
  • Just like @Motti says: we need more information: how does the html source of the combobox looks like and what is its behaviour. When you spy the object, how does it look and why can't you use `html id`? Additionally: QTP 10 on [this site](http://skirtlesden.com/articles/extjs-comboboxes-part-1) runs OK for me (identification: `WebEdit("html id:=ext-gen1020")`). Can you test that too and see how that object differs from the object in your script? – AutomatedChaos Sep 13 '12 at 08:32
  • @Motti & AutomatedChaos Please look at my question. I edited it. Please suggest the solution. – Sai Sep 13 '12 at 09:41
  • @Sai please re-look at the comments, the folks as for specific info which you did not yet deliver. The script and the screenshots don't help, they provide not the info required to understand what's going on and what the solution would be. – TheBlastOne Jun 17 '13 at 19:11
  • Sai, ExtJS is a Javascript framework. It's still using DHTML behind the scenes. – Jops Jul 03 '13 at 17:07

3 Answers3

0

Sai, consider defining a virtual object. You can find it under (Tools > Virtual Objects > New Virtual Object). Here you're manually mapping unrecognised objects against standard objects that QTP knows about. There should be a combo or list box in the pre-defined objects that come with the Web add-in.

If it doesn't work try to install the Web Extensibility Add-In. It extends support for custom web controls and toolkits like Dojo and Ajax. It should be able to handle ExtJS as well.

Jops
  • 22,535
  • 13
  • 46
  • 63
0

I came across this issue and what we did is like the below.

If Dropdown is identifying as WebEdit then

B().P().WebEdit().click
Sendkeys {"DOWN"}
Sendkeys {"DOWN"}
Sendkeys {"ENTER"}

For us the dropdown was identified as a WebEdit so we had to click that first then had to use keyboard inputs for selecting value.

Pls let me know

TechDog
  • 3,039
  • 1
  • 24
  • 30
0

Generally in ExtJs developers are not using combo box directly, they assigned an another Element for the data selection, and that element will be only visible when you click on the WebEdit, so do the following steps to select the item you want to select

step1) find the attribute name with the name "aria-owns" from WebEdit element's attributes and get its value to a variable ex: varId = "list-1234"

step2) click on WebEdit

step3) Click the Element Browser().Page().WebElement("html id:=" & varId).WebElement("innertext:=" & name of the Item to select).click

if direct click not work then use "Setting.WebPackage("ReplayType") = 2" option