Unified Functional Testing Practitioners Forum
cancel

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

Hegde53
Regular Contributor.

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

9 REPLIES
Anshoo_Arora
Super Contributor.

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

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
Hegde53
Regular Contributor.

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

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

Anshoo_Arora
Super Contributor.

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
Hegde53
Regular Contributor.

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.

Anshoo_Arora
Super Contributor.

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

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
Hegde53
Regular Contributor.

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.

Hegde53
Regular Contributor.

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!

asimmallick
Frequent Contributor.

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

 

Highlighted
asimmallick
Frequent Contributor.

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