   # Asserts the selected element(s) has the expected value for the named style
   # property.
   style: (selector, style, expected, message)->
+    if arguments.length == 2
+      expected = null
     elements = @browser.queryAll(selector)
     assert elements.length > 0, "Expected selector '#{selector}' to return one or more elements"
     for element in elements

    else
      url = URL.parse(@browser.location.href, true)
      for key, value of expected
        assertMatch url[key], value, message


  # -- Document contents --

  # Assert the named attribute of the selected element(s) has the expected value.
  attribute: (selector, name, expected, message)->
    elements = @browser.queryAll(selector)
    assert elements.length > 0, "Expected selector '#{selector}' to return one or more elements"
    for element in elements

    elements = @browser.queryAll(selector)
    assert elements.length > 0, "Expected selector '#{selector}' to return one or more elements"
    actual = elements.map((e)-> e.textContent).join("").trim().replace(/\s+/g, " ")
    assertMatch actual, expected || "", message


  # -- Window --
