Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to click a button in form #88

Closed
tengshan2008 opened this issue Mar 4, 2019 · 2 comments
Closed

How to click a button in form #88

tengshan2008 opened this issue Mar 4, 2019 · 2 comments

Comments

@tengshan2008
Copy link

tengshan2008 commented Mar 4, 2019

I have a form like this:

<form method="post">
    <input type="hidden" name="action" value="del_file">
    <table class="table table-bordered table-striped">
        <tbody>
            <tr>
                <td class="item-title"> test1.txt</td>
                <td class="item-action">
                    <button type="submit" class="btn" name="file_id" value="24247579">
                        Delete
                    </button>
                </td>
            </tr>
            <tr>
                <td class="item-title"> test2.txt</td>
                <td class="item-action">
                    <button type="submit" class="btn" name="file_id" value="22608379">
                        Delete
                    </button>
                </td>
            </tr>
            <tr>
                <td class="item-title"> test3.txt</td>
                <td class="item-action">
                    <button type="submit" class="btn" name="file_id" value="22608377">
                        Delete
                    </button>
                </td>
            </tr>
        </tbody>
    </table>
</form>

How can I click a delete button ?
The delete request is like this:
{post} http://host {Content-Type: application/x-www-form-urlencoded} data is action=del_file&file_id=22608377

please tell me what can I do for this form.

@SwapnilSoni1999
Copy link

You check networks tab and track post request and use requests module to do and get session + cookies to load again

@tengshan2008
Copy link
Author

thanks, I'm a new gay with spider tec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants