# Watir not finding element

**URL:** <https://rubytalk.org/t/watir-not-finding-element/68693>\
**Category:** ruby-talk\
**Created:** [5 November 2013 01:29 UTC](https://rubytalk.org/t/watir-not-finding-element/68693 "2013-11-05T01:29:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [5 November 2013 01:29 UTC](https://rubytalk.org/t/watir-not-finding-element/68693/1 "2013-11-05T01:29:29Z")

</div>

Can ANYONE help me with this problem:

> <https://stackoverflow.com/questions/19780260/clicking-javascript-in-ruby-watir>

Basically no matter what I do the webdriver refuses to click a  
JavaScript link.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [5 November 2013 09:56 UTC](https://rubytalk.org/t/watir-not-finding-element/68693/2 "2013-11-05T09:56:35Z")

</div>

What's the page HTML?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [5 November 2013 16:39 UTC](https://rubytalk.org/t/watir-not-finding-element/68693/3 "2013-11-05T16:39:47Z")

</div>

I cannot find the id "double\_your\_btc\_link2" anywhere on the site you  
linked.

Do you need to log in? If yes: Does Watir log in?

Try dumping the raw HTML of the page you want to test drive.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [5 November 2013 18:54 UTC](https://rubytalk.org/t/watir-not-finding-element/68693/4 "2013-11-05T18:54:04Z")

</div>

Oops, sorry guys.

@Eric, yes you do need to be logged in which Watir manages without a  
problem because the login button is an actual button.

Here's the raw HTML: [http://www.bitbin.it/raw.php?id=qhh5JuFM](http://www.bitbin.it/raw.php?id=qhh5JuFM)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
