convio/watirmark — pull request #17 by titusfortner (2014-09-24 22:51:28+00:00)
Title: Re-implements dialog extensions

We discussed changing implementation or at least changing the naming of this. While going through the watir-webdriver code, I realized that we are either mis-implementing it, or unnecessarily abstracting and obfuscating.

I'd be surprised if we need the extra Page.browser.wait calls or the special error message, in which case we can replace all 3 of these with one line of watir-webdriver code. I suggest we announce the deprecation of these 3 methods, modify our test code to use the actual watir-webdriver nomenclature, and then remove the file in the next version of watirmark.

Examples of a single line of watir-webdriver code that should capture all 3 of these methods (and I doubt when_present is actually necessary, even):
Page.browser.window(:index, 1).when_present blk
Page.browser.window(:title, /Your Test Should Know This/).when_present blk
Page.browser.window(:url, /your_test_should_know_this_too/).when_present blk

Also of note, CLO overrides these methods anyway (to address later), so I wonder if we're actually using this particular code anywhere at this point.