Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go5o4-0004JA-SU for pgadmin-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 12:14:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1go5o2-0005fx-Mf for pgadmin-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 12:14:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go5o2-0005VM-9C for pgadmin-hackers@lists.postgresql.org; Mon, 28 Jan 2019 12:14:26 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go5nx-0002LQ-Qg for pgadmin-hackers@postgresql.org; Mon, 28 Jan 2019 12:14:25 +0000 Received: by mail-lf1-x144.google.com with SMTP id c16so11646670lfj.8 for ; Mon, 28 Jan 2019 04:14:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YyzhdDS9zrab514AMRWLN188E1oJsu4i6z7x+Zf6Qyw=; b=zOc2K8JTr7bMifGMMKCUTNfoFdp8brNsaDypMZkxJhkBBIPdI6GfAeZvEgIk6s1x/G N5PpJIQ61NP3bBOVtrBA74oHefJQ9sTVZUpahqJyskzFPWcz3sgHK+WL92bcP8tviEIE Q4t4WICZke2sTc7JR2IJlcW96G5fLRmsghGNNW6Bn0Nng9p1qsr7icxhYHj3iYjBu0Cu 9moP3KDAoZssnbGT1xDcmBoGmU2Eguje0ZgJfoD8aKOTHIu29LOcxfkz10WsH0RsnPWm gZPCctrD2V/sTynHgRs7yxrp0mLcMqbadrGehTg1tykWaCOjri5Ownuf7rsvYBoTtlaO KpAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YyzhdDS9zrab514AMRWLN188E1oJsu4i6z7x+Zf6Qyw=; b=m5ka4k1guCsofnDrzRPdKonf0K1NQNzNhLOMXIluYEly9Z8jX7bH+MK8WYI760V7Kp PucyKKMcHVg9HUv7udhETPX4KGnt0v59+UAp+YMAK01YTOmNsPshI+0iyTOEUpXcGWHp +hGP86TDW8VGXPKrfrc2fzRCuwD2NJJaSJyJwhsBb+PA9nnnfLHTkEkHgBHRSPTx6zF4 qrrPicv2e5ys7/6B9yVxSnh6Z39WdqkdhPNe+1zeYJ/6S9LZk9INylOG3Qder27g8XpG AatSTRkrOo+q1dVvlb041mK3R0eOy4TNBRhIO/mkNuTd7fWr/5GuYHsifuybLDv54ywM b/FA== X-Gm-Message-State: AJcUukc0fNiJgHSLIsTpTy9b0fJ6q+zBnMgHwv2NcwqdLLm1wjoV+Ao3 ynp1AU6DbnhU7Tr8JGlco7msOUxk2YfFz/UkmjuPDA== X-Google-Smtp-Source: ALg8bN6+jPZjsMkJVJEbglOsl6KyvZEjgrYWdEvLrDvHaWnhcoI8x0fmCsumKg7hVZYiCcxOLmPAq74CaU8xmmizzgM= X-Received: by 2002:a19:f510:: with SMTP id j16mr17403279lfb.35.1548677659768; Mon, 28 Jan 2019 04:14:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Mon, 28 Jan 2019 17:44:08 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000c87da70580839d14" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000c87da70580839d14 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 28, 2019 at 5:39 PM Dave Page wrote: > On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal > wrote: > > > > Hi Dave, > > > > On Mon, Jan 28, 2019 at 5:01 PM Dave Page wrote: > >> > >> Hi > >> > >> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal > >> wrote: > >> > > >> > Hi Hackers, > >> > > >> > Attached is the patch to fix failing SQL editor related feature tests. > >> > The failure is occurring mostly because of send_keys function of > selenium which sometimes does not input the complete text. The change will > use Codemirror javascript object to set the text. > >> > > >> > I have also added new args flag "--modules" which can be used after > --pkg where you can test a specific module file under the pkg. This is not > so useful for build but definitely helpful for the developers. > >> > >> One of the most common failures I see is failure to fill in the > >> details on the Add Server dialogue (it might type half of an entry, > >> then just hang). Should we get rid of all uses of send_keys? > > > > Setting the text using javascript executor can be done. send_keys > simulate an actual person, so if you try to set a disabled text box using > send_keys, it won't. Places where disabled fields doesn't matter, send_keys > can be removed. > > Can't we just do something like: > > if input.disabled == false: > input.value = 'Foo'; > else: > raise exception .... > I'll check if this can be done. Will get back. > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" --000000000000c87da70580839d14 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jan 28, 2019 at 5:39 PM Dave= Page <dpage@pgadmin.org> wr= ote:
On Mon, Jan= 28, 2019 at 12:05 PM Aditya Toshniwal
<= aditya.toshniwal@enterprisedb.com> wrote:
>
> Hi Dave,
>
> On Mon, Jan 28, 2019 at 5:01 PM Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
>> <aditya.toshniwal@enterprisedb.com> wrote:
>> >
>> > Hi Hackers,
>> >
>> > Attached is the patch to fix failing SQL editor related featu= re tests.
>> > The failure is occurring mostly because of send_keys function= of selenium which sometimes does not input the complete text. The change w= ill use Codemirror javascript object to set the text.
>> >
>> > I have also added new args flag "--modules" which c= an be used after --pkg where you can test a specific module file under the = pkg. This is not so useful for build but definitely helpful for the develop= ers.
>>
>> One of the most common failures I see is failure to fill in the >> details on the Add Server dialogue (it might type half of an entry= ,
>> then just hang). Should we get rid of all uses of send_keys?
>
> Setting the text using javascript executor can be done. send_keys simu= late an actual person,=C2=A0 so if you try to set a disabled text box using= send_keys, it won't. Places where disabled fields doesn't matter, = send_keys can be removed.

Can't we just do something like:

if input.disabled =3D=3D false:
=C2=A0 input.value =3D 'Foo';
else:
=C2=A0 raise exception ....
I'll check if this can be = done. Will get back.=C2=A0

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Thanks and Rega= rds,
Aditya Toshniwa= l
Softw= are Engineer |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
&q= uot;Don't Complain about Heat, Plant a tree"
--000000000000c87da70580839d14--