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

Text verification

View previous topic View next topic Go down

Text verification

Post by rohit kumar gupta on Wed Nov 28, 2012 10:24 pm

In order to verify text present on the screen instead of using getText() in Assert isnt there any method wherein we can pass the text as input and test the presence of webelement?

rohit kumar gupta
Active particpant
Active particpant

Posts : 24
Join date : 2012-09-19
Age : 26
Location : abc

Back to top Go down

Re: Text verification

Post by rohit kumar gupta on Thu Nov 29, 2012 11:21 am

Code:





<html>


<head>

<body vlink="#666666" link="#000099" bgcolor="#FFFFFF">


<div>


<table height="100%" cellspacing="0" cellpadding="0" border="0">


<tbody>


<tr>


<td valign="top" bgcolor="#003366">

<td valign="top">


<table cellspacing="0" cellpadding="0" border="0">


<tbody>


<tr>

<tr>

<tr>

<tr>


<td>


<table cellspacing="0" cellpadding="0" border="0">


<tbody>


<tr>


<td width="14">
               
              </td>

<td>


<table width="492" cellspacing="0" cellpadding="0" border="0">


<tbody>


<tr>

<tr>

<tr>


<td>


<font size="2" face="Arial, Helvetica, sans-serif">[b][font=Arial Black]Use our Flight Finder
      to search for the lowest fare on participating airlines. Once you've booked
      your flight, don't forget to visit the Mercury Tours Hotel Finder to reserve
      lodging in your destination city.[/font][/b]</font>
</td>
</tr>

<tr>

<tr>


<td>


<form name="findflight" action="mercuryreservation2.php" method="post">


<table width="100%" cellpadding="2" border="0">


<tbody>


<tr>

<tr>


<td width="33%" align="right">

<td width="67%">


<b>


<font size="2" face="Arial, Helvetica, sans-serif">


<input type="radio" checked="" value="roundtrip" name="tripType">

              Round Trip 
             

<input type="radio" value="oneway" name="tripType">

              One Way
</font>
</b>
</td>
</tr>

<tr>

<tr>

<tr>

<tr>

<tr>

<tr>

<tr>

<tr>

<tr>

<tr bgcolor="#CCCCCC">

<tr>

<tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

The text highlighted in red is what i want to verify ... plz suggest


Last edited by rohit kumar gupta on Fri Nov 30, 2012 12:09 pm; edited 1 time in total

rohit kumar gupta
Active particpant
Active particpant

Posts : 24
Join date : 2012-09-19
Age : 26
Location : abc

Back to top Go down

Re: Text verification

Post by tarun3kumar on Fri Nov 30, 2012 10:09 am

You can use xPath to create element locator using text and verify its presence.
Not quite sure where the highlighted text is in you html snippet.

_________________
Thanks
Tarun K
Free Selenium Training

tarun3kumar
Master
Master

Posts : 186
Join date : 2012-02-14

http://seleniumtests.com

Back to top Go down

Re: Text verification

Post by rohit kumar gupta on Fri Nov 30, 2012 12:16 pm

Hi Tarun,




Use our Flight Finder
to search for the lowest fare on participating airlines. Once you've booked your flight, don't forget to visit the Mercury Tours Hotel Finder to reserve lodging in your destination city.[/font][/b]



I wanted to verify the text "use..... city."...
Note:- I tried this:-
//b/font/font[contains(.,'Preferences')]
//font[text()='Preferences']
both worked...to identify the preferences text on page.
But when i replace with the text above i am getting no match found in firepath.
Has it got anything to do with space . or '.....Plz advice.....

rohit kumar gupta
Active particpant
Active particpant

Posts : 24
Join date : 2012-09-19
Age : 26
Location : abc

Back to top Go down

Re: Text verification

Post by Sponsored content Today at 1:52 pm


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