[Pkg-giraffe-discuss] autopkgtest in kopano-webapp

Guido Günther agx at sigxcpu.org
Wed Dec 26 18:44:16 GMT 2018


Hi,
On Wed, Dec 26, 2018 at 07:10:16PM +0100, Carsten Schoenert wrote:
> Am 26.12.18 um 18:57 schrieb Guido Günther:
> > Can't be the same.
> 
> Absolutely spoken is this of course correct.
> 
> > ======================================================================
> > ERROR: test_login (test_webapp.TestWebApp)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/tmp/autopkgtest.cEOg0f/build.tRZ/src/debian/tests/test_webapp.py", line 64, in test_login
> >     element = WebDriverWait(self.driver, 40).until(lambda t: t.find_element_by_("class_name", "icon_createEmailMessage"))
> >   File "/usr/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 71, in until
> >     value = method(self._driver)
> >   File "/tmp/autopkgtest.cEOg0f/build.tRZ/src/debian/tests/test_webapp.py", line 64, in <lambda>
> >     element = WebDriverWait(self.driver, 40).until(lambda t: t.find_element_by_("class_name", "icon_createEmailMessage"))
> > AttributeError: 'WebDriver' object has no attribute 'find_element_by_'

My former line was slightly wrong. What I wanted to do is ignore the
passed in parameter:

    t = self
    element = WebDriverWait(self.driver, 40).until(lambda x: t.find_element_by_("class_name", "icon_createEmailMessage"))

which should be the same as:

    element = WebDriverWait(self.driver, 40).until(lambda x: self.find_element_by_("class_name", "icon_createEmailMessage"))

Cheers,
 -- Guido
> 
> ...
> 
> > Can you put the whole script and the whole trace
> > somewhere (so line numbers match (I was just guessing since I didn't
> > have the script as you ran it)?
> 
> Sure. This is my current version of test_webapp.py
> 
> https://paste.debian.net/1057463/




More information about the Pkg-giraffe-discuss mailing list