assert_hidden

17 views
Skip to first unread message

Den Dem

unread,
Jun 9, 2015, 4:45:16 PM6/9/15
to test...@googlegroups.com
While reading Practical Web Test Automation, I came across interesting part as to validate hidden element assert_hidden.
Tried to search more as I am using Rspec with Selenium and could not find any more info on that. Is there such option available for Selenium Webdriver?

Zhimin

unread,
Jun 9, 2015, 7:51:01 PM6/9/15
to test...@googlegroups.com, demd...@gmail.com
assert_hidden was a function of RWebSpec. For Selenium WebDriver, I just added one recipe "Set and assert the value of a hidden field" in Selenium WebDriver Recipes in Ruby ebook (https://leanpub.com/selenium-recipes-in-ruby). 

Den Dem

unread,
Jun 9, 2015, 8:36:02 PM6/9/15
to test...@googlegroups.com, demd...@gmail.com
Interesting approach. What about if element present on the screen, but actually hidden via dev tools.
Example,
some form page that goes step by step
1. Pick device, click on it, it will do Ajax load and show color to pick
Before picking device, color and rest option are present but in hidden status, not disabled.

Zhimin

unread,
Jun 10, 2015, 6:34:04 PM6/10/15
to test...@googlegroups.com, demd...@gmail.com
If my understand you correctly, Selenium element's display?  method is for that. You may refer the recipes in Chapter Button in Selenium WebDriver Recipes book. 
Reply all
Reply to author
Forward
0 new messages