python - Selenium RC css selector with adjacent sibling combinator picks wrong table row -


EDIT: I basically made a mistake in table data that I originally posted. Correction is in bold .

I have stainless R.C. Writing Python for I am trying to select table row in the document below that contains "United States" and "1", but the selector is always selecting the line in which the "United States" And " 214 ". I think I know why it looks like: () 214 matches "1" and that row is selected.

This is my selector syntax:

  self.selenium.click ("Css = table # filltbl tr td: contains (% s) + td: (% S) "% (country, area_code)) where country ==" United States "and area_code ==" 1 "It seems that the adjacent brother associate is being ignored.  

How can I: In (1) the match is exactly "1"?

Sorry for the thank you and the confusion.

  & lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 Transitional // N" "http://www.w3.org/TR/html4/loose.dtd"> & Lt; Html & gt; . . . & Lt; Table class = "cover" cells = "0" cell padding = "0" & ​​gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Table id = "filltbl" class = "tfill" selection = "0" cellpadding = "0" & ​​gt; & Lt; Tbody & gt; & Lt; Tr class = "fill" & gt; & Lt; Td> United States & lt; / Td> & Lt; TD & gt; 214 & lt; / TD & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; Tr class = "fill" & gt; & Lt; Td> United States & lt; / Td> & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; . . .    

Check that can be useful for creating complex css3 locators < / Div>

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -