From: | Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com> |
---|---|
To: | Anthony Emengo <aemengo(at)pivotal(dot)io> |
Cc: | Dave Page <dpage(at)pgadmin(dot)org>, Joao De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox |
Date: | 2018-05-07 08:26:15 |
Message-ID: | CANxoLDetPS4-+U7TBq9oPsOc0vHY=W-si8yyz_D9JffyuQCMiQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi Hackers,
On Sat, May 5, 2018 at 2:45 AM, Anthony Emengo <aemengo(at)pivotal(dot)io> wrote:
> Hey Akshay,
>
> Regarding your previous comment:
>
> As I know time.sleep is not a good idea and I am new to feature test and
>> in learning phase, can someone correct/suggest the way to fix those issues.
>
> Although the feature tests already have some sleeps, it’s generally not a
> best practice for browser automation. The better way is to use Waits that
> the selenium API provides, mainly because they can accept a condition to
> poll until fulfilled for rather than blocking the main thread of execution.
> http://selenium-python.readthedocs.io/waits.html#explicit-waits. With
> regards to the "fe_sendauth" password error . I’d probably would have done
> it like so (I haven’t tested this):
>
> WebDriverWait(self.driver, 10)\
> .until(EC.text_to_be_present_in_element(
> (By.NAME, 'password', server_config['db_password']))
> )
>
> Tried the above, but not able to fix the issue. time.sleep(0.5) will
work.
> In general, I ran the tests with the Firefox option and am seeing more
> failures than I usually would with Chrome. I don’t feel particularly
> strongly about the patch since our team mostly likely won’t be running it
> over the course of our development. But I still couldn’t *run* the tests
> without modify the code so that the server is up and running before the
> browser automation starts. I think that this should be addressed.
>
> Any thing in particular that I can help with regarding this, please let me
> know! 😀
>
Attached is the modified patch where I have added "
driver.implicitly_wait(1)" call only for Firefox browser. Only two test
cases are failing on my machine and I am not able to fix those. Please
someone look into it and help me out.
> Anthony
>
>
>
>
--
*Akshay Joshi*
*Sr. Software Architect *
*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
Attachment | Content-Type | Size |
---|---|---|
RM_3270_v5.patch | application/octet-stream | 8.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Akshay Joshi | 2018-05-07 09:39:42 | pgAdmin 4 commit: Backup, Maintenance and Restore should not be started |
Previous Message | Khushboo Vashi | 2018-05-07 07:23:44 | [pgAdmin4][Patch]: Fix layout of the error message in the query tool |