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 capture the validation message using selenium RC

View previous topic View next topic Go down

How To capture the validation message using selenium RC

Post by vini546 on Sun Jul 15, 2012 10:46 am

Hello everyone,

I am new to Selenium and I'l face lot of problems with capturing alert message


EX: If we Enter Invalid User name and password It displays the alert message like "Invalid User ID or password"

I am using IsTextPresent() to capture the actual message...but its not working..
please tell me how to capture the actual message ????? Rolling Eyes Twisted Evil Like a Star @ heaven

vini546
Active particpant
Active particpant

Posts : 10
Join date : 2012-07-15
Location : Ahmedabad

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by rohit13 on Mon Jul 16, 2012 11:35 am

If it is Java script alert then you can use
Code:
assertEquals("Invalid User ID or password", selenium.getAlert());
OR
Code:
assertTrue(selenium.isTextPresent("Invalid User ID or password"));

let me know whether it is working for you Smile

_________________
Radical QA
http://radical-qa.blogspot.in/
avatar
rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA

http://radical-qa.blogspot.in/

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by vini546 on Mon Jul 16, 2012 12:58 pm

Yuppp...Its working Sad Arrow

Thanqqq...Great job

vini546
Active particpant
Active particpant

Posts : 10
Join date : 2012-07-15
Location : Ahmedabad

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by ajit007 on Thu Jul 26, 2012 11:01 am

if i am giving the particular command its not capturing the alert message....

ajit007

Posts : 1
Join date : 2012-07-18

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by rohit13 on Thu Jul 26, 2012 12:23 pm

ajit007 wrote:if i am giving the particular command its not capturing the alert message....
Provide more information related to validation message, is it java script pop-up??

_________________
Radical QA
http://radical-qa.blogspot.in/
avatar
rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA

http://radical-qa.blogspot.in/

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by vini546 on Tue Jul 31, 2012 5:50 pm

Hello Ajit,

When Ever you want to capture an Alert message,Use this below command.Most of the times its working..For ur convenience I'l attach sample code bounce

// Valid User name and Empty password

@Test public void Case2() throws Exception {

Thread.sleep(3000);
selenium.type("id=passwd", "");
selenium.highlight("id=button2");
selenium.click("id=button2");
Thread.sleep(3000);
verifyTrue(selenium.isTextPresent("Enter your login name and password."));

}



vini546
Active particpant
Active particpant

Posts : 10
Join date : 2012-07-15
Location : Ahmedabad

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by vini546 on Tue Jul 31, 2012 5:52 pm

It gives Better Outputs with following tongue Question

Selenium RC + TestNg

vini546
Active particpant
Active particpant

Posts : 10
Join date : 2012-07-15
Location : Ahmedabad

Back to top Go down

Re: How To capture the validation message using selenium RC

Post by Sponsored content


Sponsored content


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