Happy week all!

Thank you!

1. If I use:  is not working

@browser.a(id: "Employee_ID").click!

  timed out after 30 seconds, waiting for true condition on
#<Watir::TextField: located: false;
{:xpath=>"//*[@id=\"infotab_11\"]/table/tbody/tr[3]/td[2]/span/div/form/div/div[1]/div[1]/input",
:tag_name=>"input"}> (Watir::Wait::TimeoutError)
      ./features/support/pages/peopleAdminPage.rb:35:in `set_given_names'
      ./features/support/pages/peopleAdminPage.rb:225:in `add_employee'
      ./features/step_definitions/adminPeopleSteps.rb:17:in `/^I add an
employee$/'
      features/features/qaeeAddEEAndDep.feature:20:in `Then I add an
employee'


2. If I use xpath is working


@browser.link(:xpath, '//*[@id="Employee_ID"]').click!
or
@browser.link(:xpath, '//*[@id="Employee_ID"]').click



So I go with xpath.


Please tell me if there is any difference between click and click!

or it doesn't matter what we use.

Thank you!


On Fri, Jun 22, 2018 at 8:20 PM, Justin Ko <jkote...@gmail.com> wrote:

> @rajagopalan, I don't know enough about the internal workings of
> JavaScript or Webdriver to be sure. But my guess would be:
>
>    - Browsers do not fully support click events for <option> elements -
>    eg https://stackoverflow.com/q/3487263/1200545
>    - As a result WebDriver has defined special logic simulating a click,
>    which includes interacting with the select element - see definition
>    https://www.w3.org/TR/webdriver/#element-click
>    <https://www.w3.org/TR/webdriver/#element-click>
>
> Justin
>
>
> On Friday, June 22, 2018 at 3:39:05 PM UTC-4, rajagopalan madasami wrote:
>>
>> Hi Justin, have you ever try to click option using JavaScript click, it
>> is not choosing as selenium click towards the option would choose the
>> option . But button click remain the same for both, do know why it is ?
>>
>> On 23-Jun-2018 1:06 AM, "Justin Ko" <jkot...@gmail.com> wrote:
>>
>> Do you try using the :id locator? It looks like you might have crossed
>> your attributes/values - ie the attempts are checking the "fielddisplayname"
>> attribute, but looking for the id value.
>>
>> Try:
>>
>> @browser.a(id: "Employee_ID").click
>>
>> If #click isn't working, you could also try #click!
>>
>> @browser.a(id: "Employee_ID").click!
>>
>> - Justin
>>
>>
>> On Friday, June 22, 2018 at 12:36:22 PM UTC-4, christina wrote:
>>
>>> Is not ok because all other attributes have the same link.
>>>
>>> I have to identify in a unique way.
>>>
>>> Please let me know how.... Thank you!
>>>
>>> On Fri, Jun 22, 2018 at 11:31 AM, c w <cristin...@gmail.com> wrote:
>>>
>>>> That worked:
>>>>
>>>> @browser.link(:class, "peoplefield editable editable-click
>>>> editable-empty").fire_event:click
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: c w <cristin...@gmail.com>
>>>> Date: Fri, Jun 22, 2018 at 11:03 AM
>>>> Subject: how can I click an <a href=javascript:; .... that is used to
>>>> go on edit mode for a field
>>>> To: watir-...@googlegroups.com
>>>>
>>>>
>>>>
>>>> Hi all,
>>>>
>>>> Please help me and Thank you!
>>>> In order to edit these attribute I have to click on the "empty" which
>>>> is a javascript:;
>>>>
>>>> Please can one tell me how can I click on the Employee_id field to
>>>> edit...
>>>> If I will be able to do this tho others should be similar.
>>>>
>>>> I have try few things but these are not working:
>>>> @browser.a(fielddisplayname: "Employee_ID").click
>>>>   @browser.a(fielddisplayname: "Employee_ID").fire_event:click
>>>>   @browser.a(:class, ' peoplefield editable editable-click
>>>> editable-empty').click
>>>>
>>>>   @browser.a(fielddisplayname: "Employee_ID").fire_event('onclick')
>>>> @browser.link(:xpath, "//a[@onclick='javascript:;']").click
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> --
>> --
>> Before posting, please read https://github.com/watir/watir
>> _meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
>> In short: search before you ask, be nice.
>>
>> watir-...@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-genera...@googlegroups.com
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to watir-genera...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
> --
> Before posting, please read https://github.com/watir/
> watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
> In short: search before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read 
https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
 
In short: search before you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to