Selenium Ruby :tab stopped working when running test - ruby

It worked until today, no code got changed
So if I do something like
page.find('#edit-user').native.send_keys(:tab, :tab) it's not working (it's highlighting the element #edit-user but not moving forward) specifically for the tab key, it's working correctly for :space or :enter.
It was working previously, it's a small possibility that it's related to some settings change for the Chrome browser but not sure exactly how and why

We are having this problem in Chrome as well, and it all started with Chrome update 44.
I tried using "\t", :tab, :return, :enter, and :escape to remove focus from a text input (symbols found here), but none of them are working in the most recent version of Chrome.
I know you mentioned you are not looking for solutions other than tab, but short of rolling back your browser version and disabling updates, or waiting for the possibility of a fix from Google itself, you will have to change the scripts being executed.
We found that this has worked well so far:
driver.execute_script("document.activeElement.blur()")
If the desired behavior in your case is to shift focus two fields forward, then you might consider another Javascript solution that looks something like what is discussed in this thread:
simulate the tab key function in javascript
Of course, this probably isn't the best long term solution, as even some very quick Googling shows that sending a tab key to switch focus has been recommended tons of times to people using WebDriver. Because of this, I'm keeping my fingers crossed there will be another Chrome update to revert the behavior.

Related

Removing Neovim window focus

I love the Gruvbox theme. The only problem I've ever had with it was when it started to cause a W18 warning on all of my newly opened buffers so, I finally decided to get rid of it. I've replaced it with the Tokyonight theme, but I've come across another issue: it doesn't seem to override the settings for transparency nor dim-inactive like the example config says it would. Frustrated and incompetent, I'm asking you guys at SO as a last resort if there is a way to remove the inactive pane/buffer dim using the solely the Neovim API in Lua?
Updating the Tokyonight config to the following
The above configuration resulted in this which is anything but what it's supposed to do.
This is what I expect to happen (with the statusbar visibility toggling on focus and other default behaviors)

GitHub Gist creation and editing not working in Firefox?

Long story short:
I tried to create/edit GitHub Gists with
Firefox 67.0 on Windows 10
Firefox 67.0 on Linux Fedora
Add-ons: NoScript, Ghostery, LastPass
Tried with NoScript and Ghostery disabled and also with NoScript in "all shields down" mode and also with Firefox in "safe mode".
Problems:
Creation of a Gist is arbitrary. More often than not, the two buttons "create public gist" and "create secret gist" just stay disabled and the editor widget is "dead".
Occasionally, creation works, the editor widget goes lives and displays line numbers and the editor buttons become active. But it happens annoyingly rarely.
Editing a Gist is arbitrary. Again, it sometimes works but currently I just get blank editor widgets that have no cursor.
Anyone else who has these problems? It may be a temporary hiccup, or maybe there is some JavaScript that Firefox doesn't like. However, a web search brings up nothing - I can't believe I am the only one stuck with this this.
My earlier testing fails completely. I was sure I had tested in safe mode with no change in result.
However I retested with the latest Firefox update (FF 67 on Linux) and found out that it is the LastPass plugin which is the root of the problem. I would not have suspected that.
Disable that plugin, leaving all the others active and Gist creation and Gist editing work.
Enable that plugin and Gist creation and Gist editing work once after a Firefox restart. But after that, you get the unresponsive text entry widget.
Similarly, running Firefox in safe mode with all plugins disabled also fixes the "problem".
And of course, if you do this using Konqueror instead of Firefox, creation/editing work too.

Watir resize_to don't work anymore

Hello i've some trouble about windows managing with Watir gem in Ruby.
I've working with watir '6.2.1' until I finished to write my program, and I always got an error that is "Element is not clickable at point (x, y)..." never at the same location, whereas really nothing was on the button that i want to focus.
In this case, i just needed to update watir to don't have this error again.
I think that this error was resolved, but i've the same error, that I already had, when i want to click exactly in the same location as before.
Before i've update watir to the last update, i used
browser.window.resize_to(1366, 786), it's worked and i did not have the error anymore.
Now, it's not working. My window does not resize anymore.. When i put back the old version, it's the same issue.
I'm sorry about my bad english, i hope that you understand what i want to explain.
Most likely you need to update your chromedriver. I get bit by that every so often because the browser will update automatically and without alerting you to that fact.. So it's not uncommon to have the browser get 'ahead' of chromedriver and things stop working or start working in strange weird ways until you realize what is going on and update chromedriver.

Code in Firefox about:config variable - what does it do?

Firefox is misbehaving, so I was looking around in about:config, and I stumbled upon something that looks like code. It was in a config variable called extentions.5103ad57a64ad.scode. I'm not familiar with the environment in which this code might run, and it seems to me that it is somewhat obfuscated, but I figure there must be someone here who can figure it out.
For readability, I've put in newlines after most semicolons, and in a few other places; originally, the code was all in one long line.
I'm having trouble with pasting the code and getting the formatting right, so I've uploaded the code to Dropbox here https://dl.dropboxusercontent.com/u/86984895/ff_code.txt
Since my first guess is that the code is malicious, I cleared the variable. It has since reset itself. I do have an idea of how to clean my machine of any malware I may have caught, but I'm still interested in knowing what this code would do, if it were run.
Seems like you have the IETab plus addon installed, which installs adware. When you go to a google page this addon shows price comparison information.
You should uninstall IE Tab Plus and install IE Tab 2, found here:
https://addons.mozilla.org/en-US/firefox/addon/92382/
Or, if you can, don't install IE Tab at all.

TextMate: Comment-line shortcut does not work anymore (Cmd-/ or Cmd-Shift-7 on my swiss layout)

I experience a quite strange behavior in TextMate since some time.
I had troubles to use the keyboard shortcut for commenting a line (which is Cmd-/ or on my swiss layout it is CMD+SHIFT+7 where SHIFT+7 results in a /) a few times already since I switched to Lion 2 months ago (before I never had any problems). I then used to restart TextMate and it worked again.
But now, restart doesn't solve the problem. So I went into the Bundle Editor and tried to reset the shortcut, and there I can set it to anything I like, but not to Cmd-/! Nothing happens when I want to record the shortcut and press CMD+SHIFT+7`, the input field stays blank!
I have some bundles installed since my switch to Lion (Cucumber, RSpec, RubyAMP, Ruby Debug, Shoulda), so maybe one of those makes troubles?? Or does the fact that I even don't seem to be able to send CMD+SHIFT+7 in the Bundle Editor imply that the Shortcut is blocked from somewhere else "outside" of TextMate?
How should I debug this? Thanks for help.
Turns out it was Skitch that was running and occupied Cmd-Shift-7.

Resources