471,330 Members | 1,173 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

if - Jython - Windows

Hi all,

I am using an open source testing framework called Marathon that
uses Jython and i am trying to create a test that will:
- click a menu item
- select Login from the list
- a new window will popup
- insert username and password
- click OK

-*-*- at this point if the login was successful there is no message
to be displayed. If the login was unsuccessful though a popup
window pops up and displays some info about the login-error and an OK
What i want to do is check whether there was an error window or not
and display a simple successful/unsuccessful message. Whats
happening though is that if the login was successful (meaning that the
pop-up window will not open), Marathon is waiting for the error
stops and does not continue with ELIF or ELSE!

This Is The Test Code, any help would be greatly appreciated:
if window('Desktop'):
select_menu('Login ...')

if window('Please Login'):
select('TextField', 'username')
select('PasswordField', 'password')

if window('Recent Error(s)'):
print "\n\nError Detected: Login Failed...\n\n"
print "\n\nSuccessfull Login...\n\n"



Jun 29 '07 #1
0 872

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Thomas Weholt | last post: by
10 posts views Thread by Randall Smith | last post: by
1 post views Thread by Oten | last post: by
4 posts views Thread by angel | last post: by
reply views Thread by Charles Griswold | last post: by
6 posts views Thread by Mike Wimpe | last post: by
2 posts views Thread by gregarican | last post: by
3 posts views Thread by donkeyboy | last post: by
3 posts views Thread by tac-tics | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.