因此,当我的灯箱被识别后,我如何访问其中的内容?
当我输入:
within("div.fancybox-wrap.fancybox-desktop.fancybox-type-iframe.fancybox-opened") do
within(:xpath, "//table[@id='small_calendar'][0]") do
page.find('td', :text => '5').click
end
end
为了
<table id="small_calendar">
我得到...
Unable to find xpath "//table[@id='small_calendar'][0]" (Capybara::Element
NotFound)
修改后的搜索......
sleep(10)
within("div.fancybox-wrap.fancybox-desktop.fancybox-type-iframe.fancybox-opened") do
within_frame('fancybox-frame') do
#within(:xpath, ".//table[@id='small_calendar'][0]") do
page.find(:xpath, ".//table[@id='small_calendar'][0]/td[@text='5']").click
#end
end
end
给我这个错误...
findElements execution failed;
Element does not exist in cache (Selenium::WebDriver::Error::StaleElement
ReferenceError)