That's because there are two links on the page that match `/ФОТОРЕПОРТАЖИ/`. 
One is inside the section (hidden), the other is outside the section (visible). 
Here's code that demonstrates this:

```ruby
b = Watir::Browser.new :chrome
b.goto "http://prm.ru/news";
b.window.resize_to(800, 600)

top_links = b.as.select { |link| link.html =~ /ФОТОРЕПОРТАЖИ/ }
section_link = b.section(class: 'rn-section_photoreport-on-main').as.find { |e| 
e.html =~ /ФОТОРЕПОРТАЖИ/ }

top_links.each do |link|
  p text: link.text, 
    visible: link.visible?, 
    in_section: link == section_link
end
```

Output:

```ruby
{:text=>"", :visible=>false, :in_section=>true}
{:text=>"ФОТОРЕПОРТАЖИ", :visible=>true, :in_section=>false}
```

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/258#issuecomment-43818577
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to