Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 25th, 2005, 5:09 PM   #1
KFR42
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 KFR42 is on a distinguished road
Simulating a users actions on a form (UI testing)

Hi, Im new here, I thought maybe some of you could help me with a problem. Basically Im writing automated testing for a piece of software and I need to write automated testing for the UI itself, i.e. actually testing the buttons etc. Im using D Unit (which I know isnt ideal for UI testing, but that doesnt really matter too much).

My problem is this, Ive got a form with buttons on and I need to write a piece of code to actually interact with those buttons in the way a user would (i.e. clicking them). The onclick event procedures are all private within the form so is there a good way to go about doing this that doesnt resort to making all click events public (as I cant really do that!!).

Thanks in advance.
KFR42 is offline   Reply With Quote
Old Apr 25th, 2005, 6:38 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You could make a program that moves the mouse around and clicks it...
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 26th, 2005, 12:47 AM   #3
KFR42
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 KFR42 is on a distinguished road
Quote:
Originally Posted by Ooble
You could make a program that moves the mouse around and clicks it...
And how would I go about doing that?
KFR42 is offline   Reply With Quote
Old Apr 27th, 2005, 5:22 AM   #4
Hero
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 Hero is on a distinguished road
Hi
If you want to click Button1,you can use following:
Button1.Click(self);

sincerely yours
Hero is offline   Reply With Quote
Old Apr 27th, 2005, 11:44 AM   #5
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
I'm thinking Hero's approach would be the easiest...
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC