Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

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/

rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 30
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/

rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 30
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 Today at 8:08 am


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