Disable smooth scroll Firefox-Selenium - selenium

I want to disable Smooth Scrolling of any page for testing purposes for firefox, I want the exact same behavior as this --disable-smooth-scrolling=true chrome's argument. With that argument, chrome basically does the scrollIntoView() instant, instead of auto.
Why do I want to disable it? Well because selenium-w3c is not waiting long enough for the animation to finish, causing ElementNotInteractableException or ClickInterceptedException.
I tried disabling a bunch of preferences, including all the settings that have "smoothScroll" in it, but no luck so far. No preference I change seems to affect firefox in any way. I have a lot of workarounds for this, but the best solution would be to disable it entirely.
Edit:
RESOLVED, I created a simple add on to override scroll-behavior from CSS.

Related

[Playwright]Is there any way to turn “Chrome automated test”off? I'm afraid the website detected this and blocked me

[Playwright]Is there any way to turn “Chrome automated test”off? I'm afraid the website detected this and blocked me.
I’m using playwright.chromium.launch_persistent_context()
This is what I want to disable.By the way,I found that when I useplaywright.chromium.launch(),there won‘t be this title anymore but I want non incognito instead of incognito
You can try to use Chromium, or add options to disable infobar
https://playwright.dev/docs/api/class-browsertype
options.args("disable-infobars");

Yoast SEO meta description not saving

I generate a Focus Keyphrase and Meta Description in Yoast SEO meta box for my Home Page. But when I exit the editor, if I go back to the Home Page, the Focus Keyphrase and Meta Description have disappeared.
Does anyone know how I can keep them?
Thanks
I spent easily 5 hours trying to track down and fix an issue with Yoast meta fields not saving properly. The only real clue I had was this console error:
Uncaught TypeError: Cannot read properties of undefined (reading 'registerPlugin') at window.wpseoScriptData.window.wpseoScriptData.featuredImage.i.registerPlugin (post-edit.js)
Based on this Yoast Github issue, it appears that the needed YoastSEO javascript app is not there when it's being called in /wp-content/plugins/wordpress-seo/js/dist/post-edit.js when the page is loading, and Yoast javascript app is not actually there, so it bonks.
So there may be something somewhere that is dequeuing the needed javascript that builds the YoastSEO object. One thing to check is to search your code base (excluding the Yoast plugin itself) for instances of wpseo, yoast, etc. If you find some code that is dequeuing/removing something, that might be it. If you have a plugin with results, deactivate if you can and check if that fixes anything.
I also noticed that the SEO Analysis drawer never loads and has the loading spinner running indefinitely. The javascript that controls the setting fields seems to work, but when you save it doesn't actually save, it just goes into the void.
All that said... I wasn't able to figure out what was wrong, but I did get it to start working again. Here's what worked for me...
After reading through a lot of different issue threads, I stumbled across some issues around security plugins blocking parts of the install process. I have my Wordfence settings dialed up pretty strict, so I deactivated it per recommendations while we go through re-installing Yoast.
After making sure that your security plugin(s) are deactivated, then deactivate and uninstall Yoast. Apparently you don't need to remove the plugin data, just uninstall. (This is also a good time to update other plugins if you haven't already).
Once you reinstall Yoast, you should have a button available to reindex the "indexables" that you need to click. It might be on the Dashboard, I don't remember. If you don't see it, you might go to Search Appearance > General > Rewrite tables > Force rewrite titles and Enable that, then save changes. I'm not 100% positive, but it seemed like after I did that, there was a panel in the General settings Dashboard or something, that said something along the lines of "Looks like some settings have changed, you should re-index your indexables now" with a button to start the process.
I also had to turn "Show SEO settings for Posts/Pages?" back on under Search Appearance > Content types. After I reinstalled, those were disabled. So maybe that helped Yoast know to load the javascript properly.
I'm not super familiar with Yoast, as you can probably tell, but after doing all this, it's working.
I believe you can also trigger the reindexing process from the CLI if you want, and that it's recommended if you have a large site with over 10k posts or whatnot.
Hope all this helps!

Chromium; how to get rid of the black circular X button in fullscreen mode?

In Chromium version 72.0.3626.121 the button to leave the fullscreen mode could be disabled by using the enable-experimental-fullscreen-exit-ui flag. In version 86.0.4240.193, this flag is no longer available.
Does somebody know how to disable this button?
I'm using the following options to start Chromium.
"chrome.exe" --no-default-browser-check --DisableSplashScreen=true --disable-infobars --overscroll-history-navigation=0 --js-flags="--expose-gc" --incognito --start-fullscreen
Adding the --kiosk option disables the button, but it also changes the behavior of the browser, which I don't want.
Appologisied if I'm wrong, and I do not propose this as a proper answer to your question, but this is what I think.
It might be possible that the only way to achieve what you want is to rebuild the browser from the source. For example, I wanted my bookmark UI to show a list bigger than few last items, was thinking this could be tweaked by a plugin or config, but it turns out it's a hardcoded const variable in the source code. An extension could use a different bookmarker to replace the bundled one. However, nothing can change that const value except changing it in the code and recompiling the browser.
Without knowing much internals it feels to me the X is there on purpose as safety, not to allow somebody to take advantage of less tech-savvy users (imagine a Windows login screen made in HTML to steal users credentials). Therefore I think very likely you will not be able to do what you want easily. A lot of the experiments and features get removed from the browser, remember the vertical-tabs were there for few versions as a hidden command-line argument, but then that got removed too.

Firefox - hide browser frame with Selenium

I'm trying to figure out how to hide the border (including the address bar, tabs, title bar... everything that isn't the browser viewport) of my Firefox instance instantiated by Selenium.
If there's some way to have it use a userChrome.css, that would be straightforward enough. I've tried loading a profile folder that included a userChrome.css using this answer as a guide, but it seemed to ignore the styles. I've also looked through Firefox's about:config to see if there's some preference that would hide the frame of the window, but I haven't found anything yet.
Any solution that allows me to hide all or some of these elements when creating the instance with Selenium would be helpful. I know it's silly, but that's how it goes sometimes, you know?
-edit-
I don't think the title bar needs to be hidden. But everything else should be hidden.
-another edit to clarify a few things-
I mentioned kiosk mode in the comments as an example of the sort of thing I'm going for. Kiosk mode isn't exactly what I'm looking for, though. The windows aren't meant to be fullscreen, but they should still lack the elements of a common browser window. Think of it as like an Electron app. Out of the box, Electron lacks an address bar, tabs, etc. That's basically what we have for our app, but it's with regular-old Firefox. Again, whether these elements are displayed or not doesn't typically impact the test, but we want them hidden anyway.
Finally, I a friend of mine tried achieving this goal using a userChrome.css wrapped in a Firefox profile and was able to get Selenium to use the userChrome. So perhaps I need to figure out what I'm doing wrong. The biggest difference between how he did it and how I'm doing it is I must use a remote web driver for testing. But even still, it should be able to load the userChrome.css file. I'll try to update this question with more details as I fiddle with it some more.
-edit-
I think the reason userChrome isn't working when specifying a profile is because of the version(s) of Selenium/Geckodriver/Firefox being used.
The geckodriver version I started with was 0.15. 0.17 behaved exactly the same. 0.18 didn't respect the profile I passed along to it at all and instead had Firefox open the profile selection window (not very useful, but I was able to at least select the correct profile and see the userChrome.css get applied). 0.24 is no different.
Firefox is 52.9.0. Not much I can do about that.
We're using selenium (standalone) server 3.8.1. Switching out for 3.141.59 Didn't change anything.
Unless there's a version combination that will work with Firefox 52, I think the only thing I can do is wait until there's an update.
At last I have figured it out. In order to get Selenium to use my custom profile, I needed to do the following:
FirefoxProfile profile = new FirefoxProfile(new File(path_to_profile));
FirefoxOptions options = new FirefoxOptions().setProfile(profile);
RemoteWebDriver driver = new RemoteWebDriver(options.toCapabilities());
driver.get(url_of_webpage);
Thanks to avinesh09 on Github for the info I needed to solve the problem. It's so simple, but this has to be the only way that I neglected to try to load the profile.
If fullscreen (kiosk) mode is what you ask for (as then all you see is the viewport) it is as simple as:
driver.manage().window().fullscreen();
It is the same user experience as pressing "F11" in your browser.

Video.js CSS Styling Broken in < IE9 - [A.K.A. Controls Hidden]

Having a bit of a conundrum with cross-browser compatibility and could use some help.
Our live version linked to below, seems to work perfectly fine on most browsers, including IE9+, but the controls appear hidden in a non-emulated stock out-of-the-box version of IE8:
http://dig-houston.com/portfolio/inspiron
Here's a screenshot of what it looks like in IE8:
At one point, I was still able to slightly see the controls sticking up from the bottom (and click) which lead me to believe something had gone awry in absolute positioning or the rejection of newer CSS techniques. But as my fine tuning progressed and heights were adjusted, I believe the controls were hidden further out of view outside the box.
That being said, I think this is just a CSS issue, but haven't targeted the right styles being applied yet. To anyone else out there using Video.js