Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
kunakavitha
Posts : 4
Join date : 2009-08-19

alert - how to handle an Alert message Empty 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

Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

alert - how to handle an Alert message Empty 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
Back to top
Permissions in this forum:
You cannot reply to topics in this forum