Jump to content
UBot Underground

How select button INPUT for a specific FORM?


Recommended Posts

Hello,

 

I'm faced with an HTML page that contains a FORM tag with a unique identifier, and an INPUT (button) tag without any unique identifiers associated with it.

 

In the same page, there are other FORMs, with the same exact INPUT (button) tag.

 

My question is, knowing the identifier of the FORM, how do I select the INPUT button on that specific form?

 

I tried this as the selector:
<tagname="form" AND name="addcomment" AND tagname="input" AND value="SUBMIT">

 

(where the outer FORM element has name attribute "addcomment", and the inner INPUT element has value attribute = "SUBMIT").

 

That did not work.  No surprise, because I think this applies to a single tag selection only.  What I need is a way to select the outer FORM first, and then the inner INPUT.

 

Can you tell me how to do that?

 

And, I don't want to do it with "offsets".  When using offsets, if the HTML of the page changes and the tags get re-arranged, then the "offset" id will be invalid, correct?

 

Thanks!

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...