Twill does not support JavaScript at all. If you need JavaScript functionality you should be looking at a tool that scripts an actual browser such as Selenium or Windmill.
Barry ----- Original Message ----- From: "kron filter" <[email protected]> To: [email protected] Sent: Saturday, April 24, 2010 5:11:43 PM Subject: Re: [twill] Twill Scripting Limitations? The doLogin() function that the "in_bu_Login" of type button (JavaScript) is trying to execute is as follows: function doLogin() { var persistInfo = true; var cb = getRememberCheckbox(); if (!persistInfo || !cb || !cb.checked) { deleteLoginInfo(); } else { var userName = ''; var usr = getUserTextbox(); if (usr) { userName = usr.value; } var authSource = 0; var sel = getAutoSourceSelect(); if (sel) { authSource = sel.selectedIndex; } storeLoginInfo(userName,authSource); } var loginForm = document.lform; var hiddenLogin = loginForm.in_hi_dologin; hiddenLogin.value = 'true'; loginForm.submit(); } >From the looks of it, this step isn't actually taking place.. nor do I know >how I'd replicate this in Python. From: [email protected] To: [email protected] Date: Sat, 24 Apr 2010 19:37:57 +0000 Subject: [twill] Twill Scripting Limitations? We need to perform a number of synthetic transactions. I don't know if I just fail at using Twill or what but I'm having a great deal of difficulty with the first two pages I'm trying to create scripts for. Example 1: www.blah.com pops up a disclaimer when first visited in a browser. Hit OK to force disclaimer to go away. There is a userID field, password field and domain selection field with a dropdown of 10 or so domains. There is a single submission button on the page. Script looks like this: go www.blah.com fv 3 in_tx_username whoamI fv 3 in_pw_userpass idunno! fv 3 in_domain DOMAIN submit After submitting, another showforms shows you the same forms and you have not been forwarded to the "home page" as you would have been forwarded to if you'd used a browser. If you try to go www.blah.com/homepage - it says that you're there but a showforms reveals the same forms on the initial www.blah.com page, which are not correct, meaning you haven't actually authenticated successfully. Example 2: A synthetic transaction against a Sharepoint page. Upon trying to visit the webpage in a browser, you're presented with a Window'd login box. Is there any way for twill to actually respond to that? Trying to visit the webpage via twill results in a timeout. Perhaps this is where the authentication realms come into play but I've not been able to succeed in using them. Thanks. The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy. Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how. _______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill _______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill
