Fwd: Re: How to improve this code?

2009-09-16 Thread Hendrik van Rooyen
From a private email, forwarded to the list: -- Forwarded Message -- Subject: Re: How to improve this code? Date: Tuesday 15 September 2009 From: Oltmans rolf.oltm...@gmail.com To: hend...@microcorp.co.za On Sep 15, 1:13 pm, Hendrik van Rooyen hend...@microcorp.co.za wrote:

Re: Fwd: Re: How to improve this code?

2009-09-16 Thread Thomas Lehmann
otherwise. Given this, I'm just trying to write a method are_elements_present(aList) whose job is to return True if and only if all elements in aList are present in page's HTML. So here is how missingItems = [str(ele) for ele in eleLocators if not selenium.is_element_present(ele)] if

Re: Fwd: Re: How to improve this code?

2009-09-16 Thread Duncan Booth
Hendrik van Rooyen hend...@microcorp.co.za wrote: def are_elements_present(eleLocators): elePresent=False if not eleLocators: return False for ele in eleLocators: if selenium.is_element_present(ele): elePresent=True else: