- kunakavitha
- Posts : 4
Join date : 2009-08-19
how to handle an Alert message
Fri Aug 21, 2009 8:34 am
Hi,
I am new to selenium and automation.
In our applications we have an alert msg used..getalert()
Once the record is added ,we get an alert msg saying record added with ok button.When i am recording this event of clicking on oK button on the alert msg is not captures and when ever i rerun the script i need to do it manually..
kindly suggest what i need to do.
script is below.
open
/test/tfav8/admin/admin_main/genadmin.php
clickAndWait
//td[@id='user']/table[2]/tbody/tr/th/table/tbody/tr[4]/td[1]/div/span/a/font
type
txt_level_code
134
type
txt_level_name
35435
clickAndWait
tfa_levelBtnSave
This is the place where the alert need to be recorded........i tried with other functions,verufyalert()...but no go............
type
txt_level_code
678
type
txt_level_name
67867
clickAndWait
tfa_levelBtnSave
I am new to selenium and automation.
In our applications we have an alert msg used..getalert()
Once the record is added ,we get an alert msg saying record added with ok button.When i am recording this event of clicking on oK button on the alert msg is not captures and when ever i rerun the script i need to do it manually..
kindly suggest what i need to do.
script is below.
This is the place where the alert need to be recorded........i tried with other functions,verufyalert()...but no go............
Re: how to handle an Alert message
Fri Aug 21, 2009 11:20 am
Hi,
Use the following command and let me know will this work or not.
1. If you have alert with 'Ok' and 'Cancel' button use this in IDE
assertConfirmation | message shown in alert {eg: Are you sure you want to empty the table?}
2. If you have alert with only "OK" button, then use this command
assertAlert | message shown in alert {Eg: Emptying the table...}
Note: The click on alert button will happen automatically, don't add any command to click on ok or cancel button.
Hope this will help you
bye
Use the following command and let me know will this work or not.
1. If you have alert with 'Ok' and 'Cancel' button use this in IDE
assertConfirmation | message shown in alert {eg: Are you sure you want to empty the table?}
2. If you have alert with only "OK" button, then use this command
assertAlert | message shown in alert {Eg: Emptying the table...}
Note: The click on alert button will happen automatically, don't add any command to click on ok or cancel button.
Hope this will help you
bye
Permissions in this forum:
You cannot reply to topics in this forum