This marketing content will be shown in place of your protected content to anyone who is not allowed to read the post…

Did you know you can tell Selenium IDE to execute certain commands only if a specific element exists on the page? The if element exists trick makes your web app testing scripts far more interesting. Here is a quick example using Selenium IDE 3 — the “new” Selenium IDE.

Log out a standard user

In this use case a WordPress multisite standard user is logged in. We can only execute our commands if we are a super admin. When trying to open a URL that is only available to the super admin an error page shows up. Thankfully this page also comes with an easily identifiable body ID set to error-page.

 

Subscribe for $5/month to read the rest of this article and gain unlimited access to all articles on this site.

%d bloggers like this: