Re: Converting getCSS Count Code from java to python

2011-02-17 Thread SMERSH009
On Feb 17, 10:25 pm, SMERSH009 wrote: > On Feb 17, 9:51 pm, Stefan Behnel wrote: > > > > > SMERSH009, 17.02.2011 22:46: > > > > am still stuck with the following error when I try to > > > print self.count_css_matches('css=[id="listGuests"]') > > > I've also included the Selenium code below. Any f

Re: Converting getCSS Count Code from java to python

2011-02-17 Thread Stefan Behnel
SMERSH009, 18.02.2011 07:25: On Feb 17, 9:51 pm, Stefan Behnel wrote: SMERSH009, 17.02.2011 22:46: class Untitled(unittest.TestCase): def count_css_matches(self, css_locator): java_script_code = ''' var cssMatches = eval_css("%s", window.document); cs

Re: Converting getCSS Count Code from java to python

2011-02-17 Thread SMERSH009
On Feb 17, 9:51 pm, Stefan Behnel wrote: > SMERSH009, 17.02.2011 22:46: > > > > > am still stuck with the following error when I try to > > print self.count_css_matches('css=[id="listGuests"]') > > I've also included the Selenium code below. Any further help would be > > appreciated. > > > Traceba

Re: Converting getCSS Count Code from java to python

2011-02-17 Thread Stefan Behnel
SMERSH009, 17.02.2011 22:46: am still stuck with the following error when I try to print self.count_css_matches('css=[id="listGuests"]') I've also included the Selenium code below. Any further help would be appreciated. Traceback (most recent call last): File "D:\Temp\1TestingApps\Selenium\Sc

Re: Converting getCSS Count Code from java to python

2011-02-17 Thread SMERSH009
On Feb 2, 7:03 am, Duncan Booth wrote: > Stefan Behnel wrote: > > You are using Selenium RC here. I have no idea if there is a Python > > API to it or what that API looks like. The rest is just trivial code > > that you can map 1:1 to Python: > > >      def count_css_matches(css_locator): > >    

Re: Converting getCSS Count Code from java to python

2011-02-02 Thread Duncan Booth
Stefan Behnel wrote: > You are using Selenium RC here. I have no idea if there is a Python > API to it or what that API looks like. The rest is just trivial code > that you can map 1:1 to Python: > > def count_css_matches(css_locator): > java_script_code = ''' > var cs

Re: Converting getCSS Count Code from java to python

2011-02-02 Thread Stefan Behnel
SMERSH009, 01.02.2011 05:23: 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.for

Re: Converting getCSS Count Code from java to python

2011-02-02 Thread Jon Clements
On Feb 1, 4:23 am, SMERSH009 wrote: > 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.get

Converting getCSS Count Code from java to python

2011-01-31 Thread SMERSH009
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))); }