Testing Lightbox in selenium!!

442 views
Skip to first unread message

Joseph Merdas

unread,
Oct 12, 2009, 4:42:08 AM10/12/09
to Selenium - Automated Software Testing
Hi,

I am trying to test a lightbox "ColorBox" but having trouble testing
it really!

I use ColorBox to show content in lightbox and would like to check if
the lightbox is closed when I click on close button within the
lightbox using Selenium. However, clicking on the lightbox close
button, hides the lightbox container div and there I would like to
test if the lightbox is closed after clicking on close button??

I tried by testing if texts still exist after clicking on close
button, but Selenium sees the content "text" since it is only hidden
within a div.

How do I do that in selenium?

Carl

unread,
Oct 13, 2009, 5:42:20 AM10/13/09
to Selenium - Automated Software Testing
Hello,

Perhaps a closer inspection of the HTML might change between the state
of open or closed. This could be handled by the class of the DIV tag
or CSS style.

When the Colorbox is open the div tag may have a class='colorbox
selected' or a specific style. When the colorbox is closed the div
tag my have a class='colorbox'.

Use firebug to inspect the element and see if there is a key
difference between these two states.

If you still have trouble please post the HTML.

Good luck,

Carl

Joseph Merdas

unread,
Oct 14, 2009, 7:02:33 AM10/14/09
to Selenium - Automated Software Testing
I found out how to do. thanks :)

I used isVisible() in Selenium
Reply all
Reply to author
Forward
0 new messages