This is a migrated thread and some comments may be shown as answers.

trouble accessing vb msgbox

3 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 01 Apr 2011, 08:17 PM
I am using the trial version of WebUI and the application that I test uses quite a bit of vb.net.  So far, I have not been able to access the msgbox type dialog boxes.  When I click on the msgbox, that action is not recorded as a step, when I use the hover over highlighting it does not access that element and when I use the different dialogs listed under "Handlers" button this did not work either. . When I added the Alert type dialog and selected the “NO” option for the HandleButton, I get a message from the WebUI application saying that “Alert dialog can only be dismissed using an OK or CLOSE button”.

 

Another issue that I am having is being able to access calendar date pickers written in vb.

Any help with these scenarios would be appreciated.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 01 Apr 2011, 09:53 PM
Hello Ben,

There are many different kinds of popups and dialogs. The way to handle each type varies slightly. To best assist you with yours we really need to see a screen shot of it so we can clearly understand what type of dialog box your are trying to deal with and show you how to handle it in the test automation.

All the best,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ben
Top achievements
Rank 1
answered on 01 Apr 2011, 10:06 PM
Below is the code that creates the msgbox that I am trying to access:


Function frmmain_OnSubmit()
   IF DeleteClick THEN
    TempReturn=Msgbox("Are you sure you want to delete this record?",52,"Are you sure?")
    if TempReturn<>6 then
     frmmain_OnSubmit=False
    End if
    DeleteClick=False
   END IF
  End Function
0
Cody
Telerik team
answered on 02 Apr 2011, 12:02 AM
Hello Ben,

Thank you for posting the code snippet. I was able to reproduce the problem and now I understand what the problem is. Our dialog handling was targeted towards JavaScript. We're not currently setup to handle VBScript generated dialogs like this one automatically.

However we can still handle it by manually adding a Generic Dialog Handler.

1) In Test Studio click the Handlers dropdown
2) Click Generic Dialog - this will add a Handle Generic dialog test step
3) In the Properties pane for this test step change Dialog Title to "Are you sure?"
4) Change HandleButtonMethod to ButtonPartialText
5) Enter either Yes or No in the ButtonPartialText property, depending on which button you want to click

Lastly on the test step right before your Handle Generic dialog (I am assuming it is a Click step) change the SimulateRealClick property to True. This should get you going.

Regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ben
Top achievements
Rank 1
Answers by
Cody
Telerik team
Ben
Top achievements
Rank 1
Share this question
or