rubywatirwatir-webdriverfirewatir

Error accessing Birthday variable using Watir during gmail sign-up


I am trying to create the gmail account through watir. As part of it while I am trying to select the birthday using div element I am unable to do.

I tried with the below one:

@ie.div(:text,'May').click

My system configurations:

IE-8
Windows-7

Solution

  • As @titusfortner indicates, that element cannot be selected/clicked because it is not visible. Using watir-webdriver, this snippet makes the dropdown menu visible so its options can be selected:

    b.div(title: "Birthday").when_present.click
    b.div(text: "May").when_present.click
    

    That being said, there are two other (read: larger) issues:

    1. You won't be able to script your way past the captcha.
    2. Google doesn't want you doing this. That's why the captcha is there, and they'll eventually block your IP if you consistently automate/script against them.