|
The bug appears to be in the cssQuery library used by Selenium. (Can be demonstrated in the example above, where ".level2:nth-child(1) .level2" If cssQuery.js is modifed: diff selenium\lib\cssQuery\src\cssQuery.js: @@ -317,7 +317,7 @@ -var WHITESPACE = /\s*([\s>+~(),]|^|$)\s*/g; Then it works. Have submitted a patch to the author of cssQuery, but in the |
|||||||||||||||||||||||||||||||||||
Demonstration test case of failure:
<html>
<head>
<style type="text/css">
.level1:nth-child(1) .level2 { background: yellow; }
</style>
</head>
<body>
<div class="level1">
<div class="level2">item1</div>
</div>
</body>
</html>
(Tested on Selenium IDE 1.0.2 + FF3.5.3)
===== Fails:
assertText
css=.level1:nth-child(1) .level2
item1
===== Succeeds:
assertText
css=.level1 .level2:nth-child(1)
item1