Selenium on JavaScript : New WordPress Site Config Script

This article continues the journey into learning Selenium on JavaScript (SoJa).  It builds on the lessons of the previous articles and adds some common library functions to make our tests more readable and starts to employ the Don’t Repeat Yourself (DRY) concept. In this case we are going to build a common library module that we will re-use in future scripts. It will load our configuration and environment.  It will also export some methods that make our test script code … Continue reading “Selenium on JavaScript : New WordPress Site Config Script”

The Code Block : WordPress Plugin Development Block 0

The very first class at The Code Block at The BlockYard is going to begin the journey with WordPress plugin development. This is a starting point only. Something to get the ball rolling. Anticipate multiple forks as we start down the “Code Block chain”. We most certainly will end up in places we don’t expect as we follow this coding journey were it takes us over the next 6 months.

Should I Update To WordPress 5

Should you update to WordPress 5? This is a question that has been asked thousands of times in the past week.    I have been asked at least a dozen times and every time my answer is the same.   NO. Unless WordPress automatically updates your site and it is more difficult to restore the prior 4.X release , then WAIT. While the WordPress 5.0 editor, the most obvious updated to WordPress in the 5 release, is definitely a step in … Continue reading “Should I Update To WordPress 5”

Vue – JavaScript Library Outside Google/Facebook Control

Vue is running on several projects to create a better admin user experience. Vuetify is layered on top and baked into WordPress themes and plugins. You will need to add a little custom CSS to stop WordPress from stomping on the UX. You’ll also add a small localize script to seed Vue with relevant data from WordPress. A little REST applet to serve Vue requests and you get a fast good looking responsive app with far less effort than custom … Continue reading “Vue – JavaScript Library Outside Google/Facebook Control”

Why WordPress REST Performance Sucks

WordPress REST performance sucks.   There, I said it.    Not because I dislike WordPress — in fact I think it is the best open source web application we have seen thus far.    It is a great piece of technology.    It even has the potential to be a great web application framework — in fact I use it for the Store Locator Plus managed service, MySLP. However, unless you are in 100% complete control of every component in the … Continue reading “Why WordPress REST Performance Sucks”

Cypress.IO Data List Processing — Testing A WordPress Plugin

Testing Store Locator Plus with lots of locations is a chore.  Thankfully Cypress.IO data list processing makes this a lot easier. It turns out that the old-school Selenium IDE scripts that we’ve been using to test Store Locator Plus for years will no longer work.   We already knew Firefox versions beyond 54 broke things — but we kept an old install on hand so while we port 500+ test scripts to a new system.   What finally broke the old-school Firefox … Continue reading “Cypress.IO Data List Processing — Testing A WordPress Plugin”

WordPress Plugin Loader Tricks

An unusually short article, for me, on basic WordPress plugin loader tricks. Basic setup Name the “loader” php file the same as the plugin directory. Text Domain must match the directory name. Avoid leading * on header lines = less bytes to process by the header processor in WordPress. Ensure it runs from within WordPress Use function_exists( ‘add_action’ ) instead of defined( ‘ABSPATH’).  It is more likely to be specific to WordPress.   It is also a better test as … Continue reading “WordPress Plugin Loader Tricks”

Selenium on JavaScript : User List Test

I wasn’t quite sure what to name this article.  The Selenium on JS example here can be used to scan any table to ensure every entry on a list of strings exists; should I name it Test Web Page Has All Your Important Data?   The test also uses a separate NodeJS module to configure that list of important string, in my case user account names; Using NodeJS modules to configure repetitive data lists?  It also employes the Promise construct … Continue reading “Selenium on JavaScript : User List Test”

JavaScript Selenium Newb Cheat Sheet

Finding documentation on Selenium is hard enough for the “main languages” of Java or Python.    There are lots of examples of how to do things there in those languages but very little for the JavaScript libraries.   While you can translate most of the Java example to JavaScript there are some differences.    You’ll also find that there is a LOT of outdated information.    To make things more interesting you’ll also find that the older the example the … Continue reading “JavaScript Selenium Newb Cheat Sheet”

A Simple Selenium Script Example Using JavaScript and Safari

In my previous articles I showed how to enable Safari for web automation (hint: developer menu Allow Remote Automation) and how to get your Node.js environment setup on MacOS to begin writing automated web application scripts.    This example is a very basic script to show how to perform a basic web page load (the MySLP site in this case) with some parameter passing that can be expanded in later examples. Enironment Preparation My test environment is running on MacOS … Continue reading “A Simple Selenium Script Example Using JavaScript and Safari”