How to select the first input[type=submit] #20

Closed
algorithmdog opened this Issue Nov 9, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@algorithmdog

Hello,
My question may be slightly off the base.I am using the spynner on my project,in which I want to click each input[type=submit] one by one. the function wk_click() requires webkit xpath selector. But I can't find the xpath selector expressing k-th input[type=submit] .. I has tried //input[type=submit][1] or (input[type=submit])[1] or input[type=submit and position()=1].All of them don't work.
Could you please help me.Thank you in advance.Thank you.

@algorithmdog

This comment has been minimized.

Show comment Hide comment
@algorithmdog

algorithmdog Nov 9, 2012

//input[@type=submit][1] or (input[@type=submit])[1] or input[@type=submit and position()=1] also have been tested and they don't work neither.

//input[@type=submit][1] or (input[@type=submit])[1] or input[@type=submit and position()=1] also have been tested and they don't work neither.

@kiorky

This comment has been minimized.

Show comment Hide comment
@kiorky

kiorky Nov 9, 2012

Owner

[1] is the second index in python ...

Owner

kiorky commented Nov 9, 2012

[1] is the second index in python ...

@algorithmdog

This comment has been minimized.

Show comment Hide comment
@algorithmdog

algorithmdog Nov 9, 2012

Thank you for reply.Maybe I didn't express my problem clearly.I am unable to select the k-th input[type=submit] with webkit xpath. For example, I want to select the third input[type=submit],//input[@type=submit][2] and (//input[@type=submit])[2] didn't work.

Thank you for reply.Maybe I didn't express my problem clearly.I am unable to select the k-th input[type=submit] with webkit xpath. For example, I want to select the third input[type=submit],//input[@type=submit][2] and (//input[@type=submit])[2] didn't work.

@algorithmdog

This comment has been minimized.

Show comment Hide comment
@algorithmdog

algorithmdog Nov 19, 2012

Could everybody help me?please.

Could everybody help me?please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment