The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> Micro Focus/Compuware TestPartner

Pages: 1
jbottiger
Member


Reged: 10/28/11
Posts: 66
Loc: FL
Control Selection Failed Run-Time Error
      #715929 - 09/05/12 12:28 PM Attachment (130 downloads)

I have a block of code in a script (subroutine) which reads as follows:

Private Sub Select_Systems_For_Merge(FileList() As String)

Dim objData

Dim intI As Integer

DotNETTreeView("Name=trvAvailable").Attach

For Each objData In DotNETTreeView("Name=trvAvailable").Items

For intI = 0 To UBound(FileList)

If Trim(FileList(intI)) = "" Then Exit For

If UCase(objData.Item(1)) = UCase(FileList(intI)) Then

DotNETTreeView("Name=trvAvailable").Attach

DotNETTreeView("Name=trvAvailable").SelectItem FileList(intI)

DotNETButton("Name=btnMoveTo").Click 'Move selected file to selected list

Exit For

End If

Next

Next

End Sub



The purpose of this block of code is to compare each item (objData) in the list of available items (DotNETTreeView("Name=trvAvailable")) with a list of valid files to select from that list (FileList). For each match, the script selects that matched item and moves it to the selected list. It is to repeat this process until all of the items from FileList are reviewed and selected if there is a match.

However, during the course of the item selection, a pop-up error window displays "Control Selection Failed" message (see attachment).

Can anyone please explain how/why this happened? It is not supposed to happen, unless it relates to improper use of the DotNETTreeView object. Is that the case? Please advise as I have a critical deadline to meet WRT this script. Your prompt response is very much appreciated. Thanks.

--------------------
V/R,
John J. Bottiger


Post Extras: Print Post   Remind Me!   Notify Moderator  
jbottiger
Member


Reged: 10/28/11
Posts: 66
Loc: FL
Re: Control Selection Failed Run-Time Error [Re: jbottiger]
      #715943 - 09/05/12 02:00 PM

Since this is dealing with a TreeView object, the selected item needs to have a "\" in front, then it will work. But this is only for single-level objects in the TreeView object.

--------------------
V/R,
John J. Bottiger


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  Myrtle, Jim Brennan, AJ, DSquared 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1383

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5