Page 1 of 1

Setup HTML does not work

Posted: Thu Dec 01, 2011 1:58 pm
by pascal
Hi again, Juan

I have imported a premade to enter automatically user and password. The project is called autologin, and is available in the premade menu in version 2.2.5.
Without touching anything, this project does not work, for some obscure reason, the setup html page does not show up, so the javascript then cannot find the user and password data. I tried to see what was wrong, but did not notice anything in the HTML code.
Regarding the javascript code, on the opposite, I find it a little complex.
As the userBoxKind and passBoxKind are supposed to exist and be unique throughout the project, then what is the use of complicating things in allowing other kind names ?
Anyway, I'm not asking you to solve this, the issue concerning Helium scraper is : why is the setup html page not displayed upon project start up ?
Hope you can reproduce this on your side. I have attached the html code that comes with the premade here after for your convenience.

Best regards.

<style type="text/css">
/* Helium Scraper will adjust the size of the displayed page to this size */
background-color: buttonface;
padding: 8px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
<script type="text/javascript">
function addOption(selectbox, text, value)
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;

function OnLoad()
var kindNames = window.external.KindNames();

var username = document.getElementById("username");
var password = document.getElementById("password");
var userBoxKind = document.getElementById("userBoxKind");
var passBoxKind = document.getElementById("passBoxKind");

for(k = 0; k < kindNames.length; k++)
addOption(userBoxKind, kindNames[k], kindNames[k]);
addOption(passBoxKind, kindNames[k], kindNames[k]);

userBoxKind.value = window.external.GetParam("userBoxKind");
passBoxKind.value = window.external.GetParam("passBoxKind");
username.value = window.external.GetParam("username");
password.value = window.external.GetParam("password");

<body onLoad="OnLoad()">
<div id="topDiv">
<form action="" method="get" id="mainForm">
<!-- Place all your content here -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td>User Box:</td>
<td><select name="userBoxKind" id="userBoxKind">
<td>Pass Box:</td>
<td><select name="passBoxKind" id="passBoxKind">
<td><input type="text" name="username" id="username"></td>
<td><input type="text" name="password" id="password"></td>

Re: Setup HTML does not work

Posted: Thu Dec 01, 2011 5:14 pm
by webmaster
Hi Pascal,

You don't need to worry about the HTML Setup code at all. Simply create a kind that selects the username box and another that selects the password box, then import the project from the New Action -> Execute Actions Tree -> More... menu in any actions tree, and assign your kinds, username and password in the screen that will popup.

If you have already imported this project then you should be able to use it from New Action -> Execute Actions Tree -> Auto login. The Setup HTML code is just the code for the screen that pops up when you add or double click this action.

You would also need to add a kind that selects the "Submit" button and use a Navigate action that simulates click on it right after your Auto login action.

Re: Setup HTML does not work

Posted: Fri Feb 10, 2012 8:59 am
by Rich

I've followed your notes above, but cannot get the password and username to set. Can you confirm where I should be setting these? I've created the username, password and navigate kinds, but get a pop up that I've not set the values.

Many thanks,


Re: Setup HTML does not work

Posted: Sat Feb 11, 2012 3:29 am
by webmaster

Please follow the steps below and let me know if you have any problem. If so, I'll need to look at the URL to see what's going on.
  1. Create a new project and navigate to your login page.
  2. Create a kind for the INPUT element where you'd enter your username and call it Username.
  3. Create a kind for the INPUT element where you'd enter your password and call it Password.
  4. Go to Actions tree 1, click on New action -> Execute Actions Tree -> More....
  5. Select Auto login and click on Import.
  6. On the next dialog, select the Username and Password kinds, type your username and password and click OK.
  7. Run Actions tree 1.

Re: Setup HTML does not work

Posted: Sat Feb 11, 2012 7:46 am
by Rich
Fantastic, thank you.