Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

css locator: the Descendant selector does not work with nth-child? #762

Closed
lukeis opened this issue Mar 2, 2016 · 6 comments
Closed

css locator: the Descendant selector does not work with nth-child? #762

lukeis opened this issue Mar 2, 2016 · 6 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 762

What steps will reproduce the problem?
1. Use verifyElementPresent in the Selenium IDE to verify this CSS locator
"div.application_details tr:nth-child(1) span.label"

What is the expected output? What do you see instead?
The element is not located. However, if I use
"div.application_details tr:nth-child(1)>td span.label", it is located. 
It seems that a direct child will make Selenium back to normal

What version of the product are you using? On what operating system?
Selenium IDE 1.0, Windows 7

Please provide any additional information below.

Reported by majun8cn on 2010-08-26 02:32:54

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by jari.bakken on 2011-04-22 10:10:19

  • Labels added: Component-IDE

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Also have same issue.

Reported by dvong-disabled@imvu.com on 2012-04-03 20:45:14

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I meet the same problem in Selenium IDE 1.9.
I try to use "css=div[id="xxx"]+div div[role=xxx]" to locate a element, but IDE cannot
find it except changing the sentence to "css=div[id="xxx"]+div>div[role=xxx]" . However,in
FirePath, the element can be located by "div[id="xxx"]+div div[role=xxx]".

Reported by chen-yajie@163.com on 2012-11-09 02:03:10

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Is this issue still actual?
For example, on the page https://code.google.com/p/selenium/
this command works as expected:
verifyElementPresent | css=div.st1 div:nth-child(1) a

Reported by barancev on 2014-07-02 22:08:39

  • Status changed: NeedsClarification

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by barancev on 2014-07-03 20:13:53

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 17:50:01

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant