Re: pgadmin_page functions updated

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Shubham Agarwal <shubham(dot)agarwal(at)enterprisedb(dot)com>
Cc: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgadmin_page functions updated
Date: 2018-06-27 15:40:28
Message-ID: CA+OCxox1q7uvWjUCQgcx1qX5GH2F8j0uLHZJ_UwKD9dEtQf5BQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Jun 26, 2018 at 8:45 AM, Shubham Agarwal <
shubham(dot)agarwal(at)enterprisedb(dot)com> wrote:

> Hi Team,
>
> I have modified the patch and used CSS Selector in add_server() function.
>

Thanks, applied.

>
> I have also tried different approaches to eliminate XPATH in click_tab()
> function but failed to do so due to following reasons-:
>
> 1. :contains() function doesnt work with CSS selector in selenium and
> since in most of the anchor tags there is no specific attribute present by
> which we can make the locator generic so that it can work for any tab.
>
> 2. Tried using link_text or partial_link_text locators but since
> click_tab() is a generic function which can click on any of the provided
> tab name and in our case we do not have every tab having href attribute, we
> have span tag as the tab as well (ex. Query tool tab) so link_text is not
> the right option for it since it work only with the href attribute or
> anchor tag.
>
> I found that in such cases XPATH is the only option to continue with.
>
> If anybody is having some another idea to achieve this using CSS Selector
> than please suggest.
>
> Thanks and Regards,
> Shubham Agarwal
>
> On Fri, Jun 15, 2018 at 4:11 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>>
>>
>> On Fri, Jun 15, 2018 at 6:32 AM, Khushboo Vashi <
>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>
>>> Hi Shubham,
>>>
>>> On Thu, Jun 14, 2018 at 3:25 PM, Shubham Agarwal <
>>> shubham(dot)agarwal(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Team,
>>>>
>>>> I have modified following two functions in pgadmin_page.py :-
>>>>
>>>> 1. click_tab() -> Added wait till element is clickable, test cases are
>>>> failing since the function attempts to click the tab which is not yet in
>>>> the state to be clicked.
>>>>
>>>> 2. add_server() -> Replaced the sleep statement with wait till element
>>>> to be clickable.
>>>>
>>>> Please find the attached patch.
>>>>
>>>> We should start using CSS selectors instead of xpath, otherwise the
>>> patch works fine and also changes look good to me.
>>>
>>
>> Yes, and we should update files as and when we touch them as part of our
>> ongoing refactoring.
>>
>> Shubham; please go through the files your patch touches, and replace any
>> xpath selectors with CSS selectors. Aside from that, the patch looked to
>> me too, and Pivotal's patch-bot seems happy with it.
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Thanks & Regards,
> Shubham Agarwal
> EnterpriseDB Corporation
>
> The Postgres Database Company
>

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

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message pgAdmin 4 Jenkins 2018-06-27 15:42:36 Build failed in Jenkins: pgadmin4-master-python26 #810
Previous Message Dave Page 2018-06-27 15:40:07 pgAdmin 4 commit: Feature test reliability improvements: