Forums

Login to WP with JWebUnit (1 post)

  1. AmirG
    Member
    Posted 1 year ago #

    Hi,

    I'm trying a simple JWebUnit test script to login to WP, but when submitting the form, nothing happens. When I give a wrong password, I get the error message, but when everything is OK, all I get is the login page again.

    webPage.setBaseUrl("http://www.mywebsite.com");
    webPage.beginAt("/wp-admin/");
    
    webPage.setTextField("log", "myusername");
    webPage.setTextField("pwd", "mypassword");
    webPage.submit();

    Do you know what could be wrong here? Why do I get the same login page after I submit?

Topic Closed

This topic has been closed to new replies.

About this Topic