It looks okay, I would change some of the comments. It's no longer
substrings but words that you are comparing so it would be better to change
the comments to reflect that.


On 11 June 2013 15:46, Somay Jain <notifications@github.com> wrote:

> In modules/tests/web2unittest.py:
>
> > @@ -364,28 +364,29 @@ def create(self,
> >                      except NoSuchElementException:
> >                          el = browser.find_element_by_id(el_id)
> >                          raw_value = False
> > -                        for option in el.find_elements_by_tag_name("option"):
> > -                            if option.text == el_value:
> > -                                option.click()
> > -                                raw_value = option.get_attribute("value")
> > -                                try:
> > -                                    raw_value = int(raw_value)
> > -                                except:
> > -                                    pass
> > -                                break
> > +                        options_list = el.find_elements_by_tag_name("option")
> > +                        # Find the Longest Common Substring that matches with el_value
> > +                        option = self.find_max_match(options_list, el_value)
>
> @graeme-f <https://github.com/graeme-f> : I have updated the code to what
> you suggested, please review
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/flavour/eden/pull/498/files#r4629550>
> .
>