QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified (1023 Views)
Reply
Occasional Advisor
Hegde53
Posts: 8
Registered: ‎07-07-2011
Message 1 of 10 (1,023 Views)

QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Hello,

 

I'm using QTP 11 with IE 9 browser. Application under test is being developed on "dijit" stylings(Dojo framework) for all UI objects.

 

I'm facing issue with WebListBox and WebTable (Rows & Columns) objects, where in they are identified as WebElements!

 

Have already installed relevant patches (Web068, Web076 and Web086) and addins (Dojo) to identify these objects, but no luck.

 

Can anyone tell me the trick to identify WebListBox (and select an item under it) and WebTable (select a row or column) for dijit stylings?

 

Thanks in advance!

 

Regards,

Vinayak Hegde

Valued Contributor
Anshoo_Arora
Posts: 82
Registered: ‎07-06-2011
Message 2 of 10 (1,009 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

[ Edited ]

The Dojo Web 2.0 add-in should be able to identify most controls. Are other dojo controls being recognized correctly?


--
Anshoo Arora
Relevant Codes
LinkedIn
Occasional Advisor
Hegde53
Posts: 8
Registered: ‎07-07-2011
Message 3 of 10 (1,007 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Thanks. Do we have any QTP patch or addin available for dijit controls?

Valued Contributor
Anshoo_Arora
Posts: 82
Registered: ‎07-06-2011
Message 4 of 10 (1,000 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

If you have Web 2.0 support installed, Dojo add-in selected and you are able to correctly identify other dojo controls and not this particular one, you may have to deploy custom support for it. 

 

Can you tell me which controls you are working with from this page:  http://demos.dojotoolkit.org/demos/

 

I ran a few tests against most controls and able to identify them all correctly with the dojo add-in selected.


--
Anshoo Arora
Relevant Codes
LinkedIn
Occasional Advisor
Hegde53
Posts: 8
Registered: ‎07-07-2011
Message 5 of 10 (994 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Control I'm working with is: Theme Previewer --> Calender --> Basic Form Widgets --> Combo

 

Combo/WebList box "class" peoperty is exactly like "Combo" class mentioned in the Theme Previewer, URL.

Valued Contributor
Anshoo_Arora
Posts: 82
Registered: ‎07-06-2011
Message 6 of 10 (989 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

[ Edited ]

See if this works:

 

'Change selection value
Selection = "Save As"

Sub DojoWorkaround(Selection)
    Dim desc, children, Iterator
    
    With Browser("title:=Theme Previewer")
        Setting.WebPackage("ReplayType") = 2
            'Change WebElement property below
            srcIndex = .WebElement("innertext:=Combo", "index:=0").Object.nextSibling.sourceIndex
            .WebElement("source_index:=" & srcIndex).Click
        Setting.WebPackage("ReplayType") = 1        
        
'Change WebTable property below With .WebTable("html id:=saveMenu1") If .Exist(0) Then Set desc = Description.Create Set children = .ChildObjects(desc) For Iterator = 1 To children.Count - 1 Step 1 If children(Iterator).GetROProperty("innertext") = Selection Then children(Iterator).Click Exit Sub End If Next End If End With End With End Sub DojoWorkaround Selection

 

Change the indicated values and see if this works for your app.

 

The above looks a little complicated.  I will install WebExt on my machine and test it out with Dojo support - it should be much simpler then.


--
Anshoo Arora
Relevant Codes
LinkedIn
Occasional Advisor
Hegde53
Posts: 8
Registered: ‎07-07-2011
Message 7 of 10 (980 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Thanks! Checked your code and tried to tweak into my need. However, it could not identify the WeElement properties.

 

Have attached a screenshot for object hierachies; There are two elements in the Location Combo box. One is (none) and another with down arrow sign. On clicking any one of these objects combo box drops down.

Occasional Advisor
Hegde53
Posts: 8
Registered: ‎07-07-2011
Message 8 of 10 (952 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Tricky part is, instead of spying the WebList object as a whole, spy the WebList item and pass the WebTable properties which are immediate parent to the WebList Item object.

 

It worked, thanks anyways!

Occasional Contributor
asimmallick
Posts: 5
Registered: ‎03-19-2012
Message 9 of 10 (897 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Use this method:

 

Read webTable cell data

=======================

strGetCellData = Browser("name:=?").Page("title:=?").WebTable("Row","Column","WebElement","0").GetRoProperty("value").

 

Click WebTable Link

============

Browser("name:=?").Page("title:=?").WebTable("Row","Column","Link","0").Click

 

Occasional Contributor
asimmallick
Posts: 5
Registered: ‎03-19-2012
Message 10 of 10 (894 Views)

Re: QTP11-IE9 --> Dijit WebListBox and WebTable (Rows & Columns) not identified

Use this method: CORRECTION

 

Read webTable cell data

=======================

strGetCellData = Browser("name:=?").Page("title:=?").WebTable("name:=?").Childtems("Row","Column","WebElement","0").GetRoProperty("value").

 

Click WebTable Link

============

Browser("name:=?").Page("title:=?").WebTable("name:=?").ChildItems("Row","Column","Link","0").Click

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.