-
Switch Statement from datapool
I am using Rational Funtional Tester to test some menu items. I have a datapool created with the variable PendingActivation created and values of 0 or 1. I log in to the application and if the menu item is present, click on it, if not, go to the next menu item. The if statement works fine, but the switch statement does not. Can anyone help me out..thanks
IF Statement - working
if ((dpInt("PendingActivation")) > 0){
link_pendingActivation().click();
}
else {
link_maintainUsers().click();
}
Switch Statement - not working
switch (MenuTest)
{
case 1:
(dpInt("PendingActivation") > 0); <- Error
link_pendingActivation().click();
break;
case 2:
(dpInt("MaintainUsers") > 0); <- Error
link_maintainUsers().click();
break;
default:
link_logOff().click();
break;
}
Errors I am getting I have made note of. The error is Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression
-
(dpInt("PendingActivation") > 0);
Why's it enclosed with extra parenthesis? If that's another IF statement I think its missing a word.
Similar Threads
-
By me_code2004 in forum .NET
Replies: 2
Last Post: 05-10-2006, 07:13 PM
-
By stormswimmer in forum Java
Replies: 7
Last Post: 12-27-2005, 09:29 AM
-
Replies: 3
Last Post: 11-01-2005, 09:48 AM
-
By Daryl Shockey in forum Database
Replies: 2
Last Post: 05-28-2002, 03:50 PM
-
By James Lin in forum .NET
Replies: 9
Last Post: 08-15-2000, 10:54 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks