Selenium2 WebDriver Ruby => how click on a hidden link

后端 未结 3 1594
北恋
北恋 2021-01-06 01:59

I use Selenium 2 WebDriver on Ruby.

How it is possible click on hidden link, with css (display: none)? the link is submenu and is visible when mouse over on menu.

3条回答
  •  悲&欢浪女
    2021-01-06 02:16

    before you search the link and click it

    @driver.execute_script('jQuery(":hidden","#nav-main").show()')
    

    jQuery should be loaded

提交回复
热议问题