Converting getCSS Count Code from java to python

SMERSH009 smersh009x at gmail.com
Tue Feb 1 05:23:34 CET 2011


Hi, I'd love some help converting this code to the python equivalent:

private int getCSSCount(String aCSSLocator){
    String jsScript = "var cssMatches = eval_css(\"%s\",
window.document);cssMatches.length;";
    return Integer.parseInt(selenium.getEval(String.format(jsScript,
aCSSLocator)));
}

http://www.eviltester.com/index.php/2010/03/13/a-simple-getcsscount-helper-method-for-use-with-selenium-rc/

Thanks for the help



More information about the Python-list mailing list