Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

how to handle an Alert message

View previous topic View next topic Go down

how to handle an Alert message

Post by kunakavitha on 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


kunakavitha

Posts : 4
Join date : 2009-08-19

Back to top Go down

Re: how to handle an Alert message

Post by Adviser on 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
avatar
Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum