Converting getCSS Count Code from java to python

SMERSH009 smersh009x at gmail.com
Mon Jan 31 23:23:34 EST 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