Question

I want to go to a site and click on a button or link for logging in. But login does not use form.

I think login procedure use javascript.

Input for username:

    <input tabindex="1" 
class="dxeEditArea_Office2003Blue dxeEditAreaSys" onkeydown="aspxEKeyDown('ctl00_wucLogin1_txtUID', event)" 
    name="ctl00$wucLogin1$txtUID" 
    onkeyup="aspxEKeyUp('ctl00_wucLogin1_txtUID', event)"
    type="text" 
    id="ctl00_wucLogin1_txtUID_I" 
    onblur="aspxELostFocus('ctl00_wucLogin1_txtUID')"
    onfocus="aspxEGotFocus('ctl00_wucLogin1_txtUID')"
    onkeypress="aspxEKeyPress('ctl00_wucLogin1_txtUID', event)"
    style="height:15px;">

The link for login is :

<a id="ctl00_wucLogin1_BtnLogin"
class="Search_button"
href="javascript:__doPostBack('ctl00$wucLogin1$BtnLogin','')"
 style="...">Login
</a>

How can I click on this link and how can I fill than input for username by twill? is there any other alternative for twill?

Thanks,

Was it helpful?

Solution

Try sending the User-Agent header with the request. In any case, twill doesn't handle JavaScript well, so you're better off trying something else.

For alternatives, there are:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top