Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There is no problem or discrepancy with <code>watir-webdriver</code>. What is happening here is a result of how the website is coded.</p> <p>The page you are accessing (<a href="https://r.espn.go.com/members/v3_1/login?language=en&amp;forwardUrl=&amp;appRedirect=http%3A%2F%2Fgames.espn.go.com" rel="nofollow">https://r.espn.go.com/members/v3_1/login?language=en&amp;forwardUrl=&amp;appRedirect=http%3A%2F%2Fgames.espn.go.com</a>) is intended to be an overlay on <a href="http://espn.go.com" rel="nofollow">http://espn.go.com</a>. Whoever coded the site assumed that the overlay page would always be accessed after a hit to the main page. So, the main page (<a href="http://espn.go.com" rel="nofollow">http://espn.go.com</a>) sets a cookie in order to test whether your user agent has cookies enabled. The overlay page with the sign in form then checks to see if the test cookie is present and, if not, displays the warning you are seeing.</p> <p>What is important to understand is that <code>watir-webdriver</code> defaults to a clean profile for each new browser instance. This means that the browser does not have any of your cookies, extensions, preferences or browsing history. Because the clean profile has never visited <a href="http://espn.go.com" rel="nofollow">http://espn.go.com</a> to receive the test cookie, the warning is being displayed.</p> <p>There are two ways to avoid this warning:</p> <ol> <li><p>You can visit the main page prior to the sign-in page, like so:</p> <pre><code>require 'watir-webdriver' browser = Watir::Browser.new browser.goto "espn.go.com" browser.goto "https://r.espn.go.com/members/v3_1/login?language=en&amp;forwardUrl=&amp;appRedirect=http%3A%2F%2Fgames.espn.go.com" </code></pre></li> <li><p>Or, you can use your default Firefox profile, which (presumably) already has the test cookie:</p> <pre><code>require 'watir-webdriver' browser = Watir::Browser.new :firefox, :profile =&gt; "default" browser.goto "https://r.espn.go.com/members/v3_1/login?language=en&amp;forwardUrl=&amp;appRedirect=http%3A%2F%2Fgames.espn.go.com" </code></pre></li> </ol> <p>Hope that helps!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload