Help with using takser to fill a basic webform with Http Get & Post

122 views
Skip to first unread message

Robin Xiao

unread,
Nov 29, 2014, 8:43:42 PM11/29/14
to tas...@googlegroups.com
Hi,

I'm new to Tasker and  trying to automate some form actions. After digging around I realized it is not as simple depending on how the form is constructed. The one I need to automate has 3 steps, or 3 submits.



The first is a log in page:   

<html><head><meta http-equiv=Content-Type content='text/html;charset=UTF-8'>
<title>log in</title><META HTTP-EQUIV=CacheControl CONTENT=no-cache>
<style type=text/css><!--.st1{font-size:36px;color:#F00;}.st2{font-size:24px;}body{background-color:#FFF;margin:4px 0;}body,td,th{font-size:12px;color:#03C;}tr{text-align:center;}.Y{background-color:#0F6}.N{background-color:#FF6;}#l{margin:0 0 5px 15px;}#l a,#l b{margin-right:1.14em;margin-left:1.14em}.gbh{border-top:1px solid #c9d7f1;font-size:1px;height:0;position:absolute;top:105px;width:100%}.st3{font-size:18px;color:#F00;}--></style>
</head>

<body>
<br>
<h1 align=center class=st1>log in</h1><hr>
<fieldset><br>

<form method=post action=ACT_ID_1>
<p align=center>User Name: <input type=text name=username value='abc' maxlength=16 size=10></p>
<p align=center>Password: <input type=password name=pwd value='654321' maxlength=16 size=10><input type=hidden name=logId value='20101222'></p>
<p align=center><input type=submit value='log in'></p>
</form>

</fieldset>
</body>
<HEAD><META HTTP-EQUIV=PRAGMA CONTENT=NO-CACHE></HEAD></html>

The second is the action page
http://192.168.0.1/ACT_ID_1

<form action="ACT_ID_701" method="post"><p align="center"><input type="submit" name="UNCLOSE1" value="Open Front Door"></p></form>


Then last is the confirmation page
http://192.168.10.13/ACT_ID_701


<form method="post" action="ACT_ID_702"><p align="center">Please Confirm<br><br><input type="submit" name="Y1" value="Open Front Door"><input type="submit" name="C0" value="Cancel"></p></form>



So far I counldn't even get to the 2nd page
With the HTTP post action, it seems to just grabbing log in source code into a txt file, return value 200 for %HTTPR and "%HTTPD" itself as a text string for %HTTPD

Any one has any ideas?

 
Reply all
Reply to author
Forward
0 new messages