Click succeeds but action as the result of that click is not triggered

37 views
Skip to first unread message

rajagopalan madasami

unread,
Jun 16, 2019, 8:47:51 AM6/16/19
to Watir General
Hi Titus,

I have raised this issue in Geckodriver, but I want to ask you whether this kind of problem can be resolved from programming level in WATIR

Here is the link

Chuck van der Linden

unread,
Jul 19, 2019, 12:47:02 PM7/19/19
to Watir General
Looks like a geckodriver issue alright, especially if it works fine in chrome.

I've sometimes been able to work around this by digging into the code on the browser side to see if there's a specific event it's looking for and then firing that event against the element

Titus Fortner

unread,
Jul 19, 2019, 1:09:27 PM7/19/19
to Watir General
The trace you provided only shows a single click, so it isn't a geckodriver issue.

Do Watir.logger.level = :debug & Selenium::WebDriver.logger.level = :debug
link to a gist with the output. Something appears to be preventing the click command from happening.






On Sunday, June 16, 2019 at 5:47:51 AM UTC-7, rajagopalan madasami wrote:

rajagopalan madasami

unread,
Aug 1, 2019, 1:10:25 AM8/1/19
to Watir General
yes. Something that firefox people has to fix it.

rajagopalan madasami

unread,
Aug 1, 2019, 1:11:30 AM8/1/19
to Watir General


On Friday, 19 July 2019 22:39:27 UTC+5:30, Titus Fortner wrote:
The trace you provided only shows a single click, so it isn't a geckodriver issue.

Do Watir.logger.level = :debug & Selenium::WebDriver.logger.level = :debug
link to a gist with the output. Something appears to be preventing the click command from happening.

>> Something appears to be preventing the click command from happening.<<

Then it should be the problem with geckodriver,eh?

Titus Fortner

unread,
Aug 1, 2019, 3:24:56 AM8/1/19
to Watir General
I literally and explicitly said the exact opposite of what you did. 

The logs you provided on Github showed the driver only received one request to click an element. If you expected it to have received more, then you need to figure out why the code did not send more, hence my suggestion to obtain more logging information. Or even better use a debugger to walk through the code to figure out where the disconnect is.

rajagopalan madasami

unread,
Aug 1, 2019, 4:58:41 AM8/1/19
to Watir General
I have created a gist here, You can see click is issued but not triggered anything. But I am not sure whether you can know whether page has moved to the next page or not but I can see while I am running it.

Titus Fortner

unread,
Aug 2, 2019, 11:10:54 AM8/2/19
to watir-general
A single click not happening is not what you described in the ticket. Can you provide the code you used to generate this log and how it is different from what you expect?


--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/watir-general/60ab76c3-23e8-4b41-802f-56954b662fe4%40googlegroups.com.

rajagopalan madasami

unread,
Aug 3, 2019, 1:34:58 AM8/3/19
to Watir General
Click is issued but action as a result of that click is not triggered.

Okay, execute this code, you would see program succeeds but application doesn't get logged in.

require 'watir'
b=Watir::Browser.new :firefox
b.goto 'https://uat.allianz-go.com'
b.text_field(name: 'username').set 'JyoUser'
b.text_field(name: 'password').set 'Test@123'
b.button(id: 'producer').click



---
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-...@googlegroups.com.

Titus Fortner

unread,
Aug 3, 2019, 2:48:41 PM8/3/19
to Watir General
This code works just fine for me. I'm on a Mac, and I can't easily check it works on Windows, but everything looks good to me.
Is it perhaps a timing issue on your machine? If you temporarily put a sleep statement there will it work?

rajagopalan madasami

unread,
Aug 5, 2019, 12:12:01 AM8/5/19
to Watir General
Yes, If I introduce sleep before button click, it works fine.

rajagopalan madasami

unread,
Aug 10, 2019, 11:23:05 AM8/10/19
to Watir General

Hi Titus,

did you notice the whimboo is asking anything has changed in ruby binding for prining the geckodriver. Can you please reply to him?

>>Note that I also don't use Ruby. And if the instructions as layed out on the trace log page don't work, it might be good to know what the Ruby folks changed. Once we know we could update the docs.<<

Titus Fortner

unread,
Aug 10, 2019, 11:36:32 AM8/10/19
to Watir General
If a sleep fixes it, then it isn't the test library code or the driver, it has to do with when the app you are testing assigns the events to the elements. Is it angular or react? Essentially the test code is telling the driver to click before the app is ready, even though the element is displayed and enabled, etc. Unfortunately there isn't an easy fix for this. I have in the past implemented a click_until method that would check for the click doing what I wanted it to do and retrying if it didn't.

rajagopalan madasami

unread,
Aug 11, 2019, 11:09:12 AM8/11/19
to Watir General
But that's not happening with Chrome. It happens so properly in Chrome. This means, the problem is surely with Firefox or Geckodriver. Anyway can you guide me how to print the geckodriver log which Whimboo is asking? How to print the geckodriver log via WATIR?

Titus Fortner

unread,
Aug 11, 2019, 12:17:54 PM8/11/19
to Watir General
If a sleep fixes it, it's a race condition. The rest doesn't matter.

Justin Ko

unread,
Aug 12, 2019, 3:23:58 PM8/12/19
to Watir General
Manually (ie as a person, not automated by Watir) doing the steps, I am able to reproduce the problem. It happened frequently in Firefox, but could also be seen occasionally in Chrome. As the problem can be seen manually, this does not seem to be a Geckodriver, Watir or Selenium problem.

To me, it seems like a problem with loading the page. When the button failed in Firefox, the console had errors. The following was seen when loading the page:

require.js load timeout for modules: main

The following was seen when clicking the button:

ReferenceError: Communication is not defined

Hope that helps.

- Justin

rajagopalan madasami

unread,
Aug 12, 2019, 11:09:42 PM8/12/19
to Watir General
Hi,

Is there anyway I can talk to Alex who handles the selenium binding? he might be knowing how to print the geckodriver log?

rajagopalan madasami

unread,
Aug 12, 2019, 11:10:12 PM8/12/19
to Watir General
Hi Justin,

Thanks for answer. Justin, Do you know how to print the geckodriver log via watir?
Reply all
Reply to author
Forward
0 new messages