Bug 175261 - Web Automation: setUserInputForCurrentJavaScriptPrompt should fail if current dialog is not a prompt
Summary: Web Automation: setUserInputForCurrentJavaScriptPrompt should fail if current...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 175259
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-07 04:11 PDT by Carlos Garcia Campos
Modified: 2017-08-08 01:29 PDT (History)
7 users (show)

See Also:


Attachments
Patch (11.83 KB, patch)
2017-08-07 04:19 PDT, Carlos Garcia Campos
bburg: review+
Details | Formatted Diff | Diff
Patch for landing (11.82 KB, patch)
2017-08-07 23:28 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch for landing (11.92 KB, patch)
2017-08-07 23:52 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Carlos Garcia Campos 2017-08-07 04:12:23 PDT
This causes test testSettingTheValueOfAnAlertThrows to fail:

_______________________________________________________________________ testSettingTheValueOfAnAlertThrows[WebKitGTK] ________________________________________________________________________

driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="9ba3f06c-5437-4548-93de-bd4eb5c12f15")>, pages = <conftest.Pages object at 0x7f4785758950>

    @pytest.mark.xfail_chrome(
        reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1353')
    @pytest.mark.xfail_phantomjs(
        reason='https://github.com/detro/ghostdriver/issues/20',
        raises=WebDriverException)
    def testSettingTheValueOfAnAlertThrows(driver, pages):
        pages.load("alerts.html")
        driver.find_element(By.ID, "alert").click()
    
        alert = _waitForAlert(driver)
        with pytest.raises(InvalidElementStateException):
>           alert.send_keys("cheese")
E           Failed: DID NOT RAISE <class 'selenium.common.exceptions.InvalidElementStateException'>
Comment 2 Carlos Garcia Campos 2017-08-07 04:19:44 PDT
Created attachment 317411 [details]
Patch
Comment 3 BJ Burg 2017-08-07 11:19:16 PDT
Comment on attachment 317411 [details]
Patch

r=me if it builds. Please upload rebased patch.
Comment 4 Radar WebKit Bug Importer 2017-08-07 23:25:52 PDT
<rdar://problem/33770078>
Comment 5 Carlos Garcia Campos 2017-08-07 23:28:26 PDT
Created attachment 317546 [details]
Patch for landing
Comment 6 Build Bot 2017-08-07 23:30:30 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 7 Carlos Garcia Campos 2017-08-07 23:52:43 PDT
Created attachment 317548 [details]
Patch for landing
Comment 8 Carlos Garcia Campos 2017-08-08 01:29:30 PDT
Committed r220394: <http://trac.webkit.org/changeset/220394>