Completed
Last Updated: 15 Nov 2013 13:01 by ADMIN
ADMIN
Velin Koychev
Created on: 13 Nov 2013 09:49
Type: Bug Report
0
Test Studio cannot handle frames with FriendlyName FrameInfo in a VB project
Test Studio can generate FrameInfo as a FriendlyName for a frame. If this project is VB, when you try to run one of the test lists you will receive the following error:
 
The list(s) contains test(s) that need to be compiled and the project
compilation returns 1 error(s). Do you want to execute the test list
anyway?
Errors follow:
C:\Users\koychev\Desktop\testing\HiScoutWeb\Pages.g.vb(441,O):
error BC30288: Local variable ‘framelnfo’ is already declared in the
current block.

Sample test project is attached to the internal bug description.
1 comment
ADMIN
Konstantin Petkov
Posted on: 15 Nov 2013 13:01
Hello,

That is correct, however that's beyond our control. The problem comes from the fact that VB doesn't let you have a variable and property return type with the same name even for lower vs. upper case named. This is supported in CS and the same code compiles just fine. See the "frameInfo" and "FrameInfo" usage below.

VB:
        Public ReadOnly Property FrameInfo() As FrameInfoFrame
            Get
                Dim frameInfo As FrameInfo = New FrameInfo("", "Frame_1", "http://www.w3schools.com/tags/frame_a.htm", "", 1, false, false)
                Me._ownerBrowser.WaitForFrame(frameInfo1)
                Return New FrameInfoFrame(Me._ownerBrowser.Frames(frameInfo).Find)
            End Get
        End Property

CS:
            public FrameInfoFrame FrameInfo
            {
                get
                {
                    FrameInfo frameInfo = new FrameInfo("", "Frame_1", "http://www.w3schools.com/tags/frame_a.htm", "", 1, false, false);
                    this._ownerBrowser.WaitForFrame(frameInfo);
                    return new FrameInfoFrame(this._ownerBrowser.Frames[frameInfo].Find);
                }
            }

Regards!