Skip to content Skip to sidebar Skip to footer

Selenium With Phantomjs: Form Being Validated But Not Submitted

I'm having a strange problem submitting a form through Selenium Webdriver's PhantomJS API. Upon clicking the submit button, the form gets validated (are the username and password t

Solution 1:

i'm not exactly certain which of my changes caused the breakthrough, but i can say i added the following code. edit: only two of these were new. removed one.

    webdriver.DesiredCapabilities.PHANTOMJS["phantomjs.page.settings.localToRemoteUrlAccessEnabled"] = True
    webdriver.DesiredCapabilities.PHANTOMJS["phantomjs.page.settings.browserConnectionEnabled"] = True

and i submitted the form itself, rather than clicking a button ( i had also tried this previously, prior to changing the above configs ).

        formEl = self.find_element_by_css_selector("form[name='login']")
        formEl.submit()

Post a Comment for "Selenium With Phantomjs: Form Being Validated But Not Submitted"