You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oscar Bastidas <ob...@umn.edu> on 2019/09/18 07:00:31 UTC

Re: Using HttpClient to Click an Icon Button

Hello Oleg,

Would you please tell me if capturing HTTP activity as you suggested in the
previous e-mail requires additional software, or if use of the plain web
browser (i.e. Google Chrome) is sufficient?  Thanks!

Oscar

Oscar Bastidas, Ph.D.
Postdoctoral Research Associate
University of Minnesota

On Tue, Mar 26, 2019, 3:09 AM Oleg Kalnichevski <ol...@apache.org> wrote:

> On Mon, 2019-03-25 at 18:22 -0500, Oscar Bastidas wrote:
> > Hello,
> >
> > I am trying to programmatically fill out a multi-page web form that
> > contains up-loading a file, subsequent text boxes, radio buttons,
> > etc...
> > and the final "submit button" is actually an icon instead of an
> > actual
> > submit button with traditional name-value pair fields in the HTML
> > code:
> >
> > ...
> > <script>
> > var form = $('pdb');
> >
> > function proceed() {
> > form.submit();
> > }
> > </script>
> > *<div id=input_nav>*
> > *<table class="nav_entry" onclick="proceed();" align=right>*
> > * <tr>*
> > * <td align="right">Next Step:<br/>Select Model/Chain</td>*
> > * <td width="51" align="left"><img src="images/basic/next.png
> > <http://charmm-gui.org/images/basic/next.png>"></td>*
> > * </tr>*
> > *</table>*
> > *</div>*
> > </div></div>
> > </div>
> >
> > ...
> >
> > Once the above icon is clicked, I am taken to another page with more
> > text
> > boxes, drop-down menus, etc... until finally reaching the last page
> > (about
> > 4 pages later) where I finally have to download a file prepared
> > according
> > to the form fill-out.
> >
> > My question is: how do I use HttpClient to click the above button to
> > proceed to the next page?  I have tried looking through many forums
> > on the
> > internet, but none address my specific situation and I am stuck.  One
> > StackOverflow conversation claimed that HttpClient can pull this off,
> > but
> > no actual code was ever provided (so I am optimistic this can be
> > done).
> > Any help would be greatly appreciated.  Thanks.
> >
>
> The easiest way would be to capture HTTP traffic generated with a
> browser and reproduce the same HTTP message exchanges with HttpClient.
>
> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

Re: Using HttpClient to Click an Icon Button

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2019-09-18 at 02:00 -0500, Oscar Bastidas wrote:
> Hello Oleg,
> 
> Would you please tell me if capturing HTTP activity as you suggested
> in the
> previous e-mail requires additional software, or if use of the plain
> web
> browser (i.e. Google Chrome) is sufficient?  Thanks!
> 

Hi Oscar

I suppose modern browsers all have support for HTTP packet analysis
built it. I am sure there are also plug-ins.

Oleg  


> Oscar
> 
> Oscar Bastidas, Ph.D.
> Postdoctoral Research Associate
> University of Minnesota
> 
> On Tue, Mar 26, 2019, 3:09 AM Oleg Kalnichevski <ol...@apache.org>
> wrote:
> 
> > On Mon, 2019-03-25 at 18:22 -0500, Oscar Bastidas wrote:
> > > Hello,
> > > 
> > > I am trying to programmatically fill out a multi-page web form
> > > that
> > > contains up-loading a file, subsequent text boxes, radio buttons,
> > > etc...
> > > and the final "submit button" is actually an icon instead of an
> > > actual
> > > submit button with traditional name-value pair fields in the HTML
> > > code:
> > > 
> > > ...
> > > <script>
> > > var form = $('pdb');
> > > 
> > > function proceed() {
> > > form.submit();
> > > }
> > > </script>
> > > *<div id=input_nav>*
> > > *<table class="nav_entry" onclick="proceed();" align=right>*
> > > * <tr>*
> > > * <td align="right">Next Step:<br/>Select Model/Chain</td>*
> > > * <td width="51" align="left"><img src="images/basic/next.png
> > > <http://charmm-gui.org/images/basic/next.png>"></td>*
> > > * </tr>*
> > > *</table>*
> > > *</div>*
> > > </div></div>
> > > </div>
> > > 
> > > ...
> > > 
> > > Once the above icon is clicked, I am taken to another page with
> > > more
> > > text
> > > boxes, drop-down menus, etc... until finally reaching the last
> > > page
> > > (about
> > > 4 pages later) where I finally have to download a file prepared
> > > according
> > > to the form fill-out.
> > > 
> > > My question is: how do I use HttpClient to click the above button
> > > to
> > > proceed to the next page?  I have tried looking through many
> > > forums
> > > on the
> > > internet, but none address my specific situation and I am
> > > stuck.  One
> > > StackOverflow conversation claimed that HttpClient can pull this
> > > off,
> > > but
> > > no actual code was ever provided (so I am optimistic this can be
> > > done).
> > > Any help would be greatly appreciated.  Thanks.
> > > 
> > 
> > The easiest way would be to capture HTTP traffic generated with a
> > browser and reproduce the same HTTP message exchanges with
> > HttpClient.
> > 
> > Oleg
> > 
> > 
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> > 
> > 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org