Is it possible to test Element background colour,padding and margin,font size,font family using Selenium IDE

1,558 views
Skip to first unread message

Raja

unread,
Sep 26, 2010, 8:30:31 AM9/26/10
to Selenium Users
Hi All,

Can anyone tell me how to test element color,padding,margin,font size
and font family,font-weight using Selenium IDE.

Can we take an example and discuss this further.Here i would like to
take an example as
http://groups.google.com/
Steps to reproduce:
Go to http://groups.google.com/
1.Click on inspect element of firebug and select "Google groups"
element against text box.
2.Notice HTML tags have values to test - Please provide solution for
this and
3.If HTML values are not available then i want to use Style tab of
Firebug.

Kindly anyone help me with solution

Thanks in advance.



Jayakumar C

unread,
Sep 28, 2010, 12:14:51 AM9/28/10
to seleniu...@googlegroups.com
You can use verifyAttribute.

<tr>
    <td>verifyAttribute</td>
    <td>//img[@alt='Go to Google Groups Home']@style</td>
    <td>border: 0pt none ; position: relative; margin-top: 10px; margin-bottom: 5px;</td>
</tr>






--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.




--
Jayakumar

Raja

unread,
Sep 28, 2010, 7:10:09 AM9/28/10
to Selenium Users
Thanks very much Jaya Kumar, it helped me.

Is it possible to validate cufon text using Selenium IDE
ex: Go to http://cufon.shoqolate.com/examples/text-shadow.html
inspect element/text called Lorem , ipsum, dolor, sit

Please give me an example code for atleast two elements.

With cufon text Lorem and Ipsum is treated as different elements

Please help me in this as well.

Thanks in advance.

On Sep 28, 5:14 am, Jayakumar C <jayakumaree...@gmail.com> wrote:
> You can use verifyAttribute.
>
> <tr>
>     <td>verifyAttribute</td>
>     <td>//img[@alt='Go to Google Groups Home']@style</td>
>     <td>border: 0pt none ; position: relative; margin-top: 10px;
> margin-bottom: 5px;</td>
> </tr>
>
> On 26 September 2010 05:30, Raja <raju.pak...@gmail.com> wrote:
>
>
>
> > Hi All,
>
> > Can anyone tell me how to test element color,padding,margin,font size
> > and font family,font-weight using Selenium IDE.
>
> > Can we take an example and discuss this further.Here i would like to
> > take an example as
> >http://groups.google.com/
> > Steps to reproduce:
> > Go tohttp://groups.google.com/
> > 1.Click on inspect element of firebug and select "Google groups"
> > element against text box.
> > 2.Notice HTML tags have values to test - Please provide solution for
> > this and
> > 3.If HTML values are not available then i want to use Style tab of
> > Firebug.
>
> > Kindly anyone help me with solution
>
> > Thanks in advance.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > .

Jayakumar C

unread,
Sep 28, 2010, 7:31:22 AM9/28/10
to seleniu...@googlegroups.com
Try this to get the entire text of h1 element,
<tr>
    <td>storeText</td>
    <td>//h1</td>
    <td>full_text</td>
</tr>

This is to get the first cufon text of h1,
<tr>
    <td>storeText</td>
    <td>//h1//cufon[1]</td>
    <td>lorem_text</td>
</tr>

You can use 'verifyText' to validate the expected text in a element.

Hope this helps.


To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.




--
Jayakumar

raj paka

unread,
Sep 28, 2010, 7:53:00 AM9/28/10
to seleniu...@googlegroups.com
Hi Jaya Kumar,

Thanks very much.

Could you please give one more example lets say with "ipsum" including verifyText code.

Jayakumar C

unread,
Sep 28, 2010, 7:59:10 AM9/28/10
to seleniu...@googlegroups.com
hmm.. here it is,

<tr>
    <td>verifyText</td>
    <td>//h1//cufon[2]</td>
    <td>ipsum</td>
</tr>

Jayakumar C

unread,
Sep 28, 2010, 8:04:22 AM9/28/10
to seleniu...@googlegroups.com
For complete text verification in h1 element you can use,
<tr>
    <td>verifyText</td>
    <td>//h1</td>
    <td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</td>
</tr>
--
Jayakumar

raj paka

unread,
Sep 28, 2010, 9:25:47 AM9/28/10
to seleniu...@googlegroups.com
Thanks very much Jaya Kumar.

Santhosh Kumar Ponnusamy

unread,
Jul 25, 2013, 12:33:02 AM7/25/13
to seleniu...@googlegroups.com

Hi Jayakumar,

In my application there are 3 tabs.. if i click anyone of the tab, then the font colour and background colour need to change.. can u please help me.. am using selenium IDE and RC..
CODE:
<body class="page-bench">
<header class="group bar dark">
<h1>WORKBENCH</h1>
<ul class="group menu">
<li>TAB1</li>
<li>
<a href="#">TAB2</a>
</li>
<li id="evidence-report">
<a href="#">TAB3</a>
</li>
</ul>

Reply all
Reply to author
Forward
0 new messages