Tag Archives: class

Automating Your Feature Testing With Selenium WebDriver




Automating Your Feature Testing With Selenium WebDriver

Nils Schütte



This article is for web developers who wish to spend less time testing the front end of their web applications but still want to be confident that every feature works fine. It will save you time by automating repetitive online tasks with Selenium WebDriver. You will find a step-by-step example for automating and testing the login function of WordPress, but you can also adapt the example for any other login form.

What Is Selenium And How Can It Help You?

Selenium is a framework for the automated testing of web applications. Using Selenium, you can basically automate every task in your browser as if a real person were to execute the task. The interface used to send commands to the different browsers is called Selenium WebDriver. Implementations of this interface are available for every major browser, including Mozilla Firefox, Google Chrome and Internet Explorer.

Automating Your Feature Testing With Selenium WebDriver

Which type of web developer are you? Are you the disciplined type who tests all key features of your web application after each deployment. If so, you are probably annoyed by how much time this repetitive testing consumes. Or are you the type who just doesn’t bother with testing key features and always thinks, “I should test more, but I’d rather develop new stuff.” If so, you probably only find bugs by chance or when your client or boss complains about them.

I have been working for a well-known online retailer in Germany for quite a while, and I always belonged to the second category: It was so exciting to think of new features for the online shop, and I didn’t like at all going over all of the previous features again after each new software deployment. So, the strategy was more or less to hope that all key features would work.

One day, we had a serious drop in our conversion rate and started digging in our web analytics tools to find the source of this drop. It took quite a while before we found out that our checkout did not work properly since the previous software deployment.

This was the day when I started to do some research about automating our testing process of web applications, and I stumbled upon Selenium and its WebDriver. Selenium is basically a framework that allows you to automate web browsers. WebDriver is the name of the key interface that allows you to send commands to all major browsers (mobile and desktop) and work with them as a real user would.

Preparing The First Test With Selenium WebDriver

First, I was a little skeptical of whether Selenium would suit my needs because the framework is most commonly used in Java, and I am certainly not a Java expert. Later, I learned that being a Java expert is not necessary to take advantage of the power of the Selenium framework.

As a simple first test, I tested the login of one of my WordPress projects. Why WordPress? Just because using the WordPress login form is an example that everybody can follow more easily than if I were to refer to some custom web application.

What do you need to start using Selenium WebDriver? Because I decided to use the most common implementation of Selenium in Java, I needed to set up my little Java environment.

If you want to follow my example, you can use the Java environment of your choice. If you haven’t set one up yet, I suggest installing Eclipse and making sure you are able to run a simple “Hello world” script in Java.

Because I wanted to test the login in Chrome, I made sure that the Chrome browser was already installed on my machine. That’s all I did in preparation.

Downloading The ChromeDriver

All major browsers provide their own implementation of the WebDriver interface. Because I wanted to test the WordPress login in Chrome, I needed to get the WebDriver implementation of Chrome: ChromeDriver.

I extracted the ZIP archive and stored the executable file chromedriver.exe in a location that I could remember for later.

Setting Up Our Selenium Project In Eclipse

The steps I took in Eclipse are probably pretty basic to someone who works a lot with Java and Eclipse. But for those like me, who are not so familiar with this, I will go over the individual steps:

  1. Open Eclipse.
  2. Click the “New” icon.
    Creating a new project in Eclipse
    Creating a new project in Eclipse
  3. Choose the wizard to create a new “Java Project,” and click “Next.”
    Chosing the java-project wizard
    Choose the java-project wizard.
  4. Give your project a name, and click “Finish.”
    Eclipse project wizard
    The eclipse project wizard
  5. Now you should see your new Java project on the left side of the screen.
    Java project successfully created
    We successfully created a project to run the Selenium WebDriver.

Adding The Selenium Library To Our Project

Now we have our Java project, but Selenium is still missing. So, next, we need to bring the Selenium framework into our Java project. Here are the steps I took:

  1. Download the latest version of the Java Selenium library.

    Downloading the Selenium library
    Download the Selenium library.
  2. Extract the archive, and store the folder in a place you can remember easily.
  3. Go back to Eclipse, and go to “Project” → “Properties.”
    Eclipse Properties
    Go to properties to integrate the Selenium WebDriver in you project.
  4. In the dialog, go to “Java Build Path” and then to register “Libraries.”
  5. Click on “Add External JARs.”
    Adding the Selenium lib to your Java build path.
    Add the Selenium lib to your Java build path.
  6. Navigate to the just downloaded folder with the Selenium library. Highlight all .jar files and click “Open.”
    Selecting the correct files of the Selenium lib.
    Select all files of the lib to add to your project.
  7. Repeat this for all .jar files in the subfolder libs as well.
  8. Eventually, you should see all .jar files in the libraries of your project:
    Selenium WebDriver framework successfully integrated into your project
    The Selenium WebDriver framework has now been successfully integrated into your project!

That’s it! Everything we’ve done until now is a one-time task. You could use this project now for all of your different tests, and you wouldn’t need to do the whole setup process for every test case again. Kind of neat, isn’t it?

Creating Our Testing Class And Letting It Open the Chrome Browser

Now we have our Selenium project, but what next? To see whether it works at all, I wanted to try something really simple, like just opening my Chrome browser.

To do this, I needed to create a new Java class from which I could execute my first test case. Into this executable class, I copied a few Java code lines, and believe it or not, it worked! Magically, the Chrome browser opened and, after a few seconds, closed all by itself.

Try it yourself:

  1. Click on the “New” button again (while you are in your new project’s folder).
    New class in eclipse
    Create a new class to run the Selenium WebDriver.
  2. Choose the “Class” wizard, and click “Next.”
    New class wizard in eclipse
    Choose the Java class wizard to create a new class.
  3. Name your class (for example, “RunTest”), and click “Finish.”
    Eclipse Java Class wizard
    The eclipse Java Class wizard.
  4. Replace all code in your new class with the following code. The only thing you need to change is the path to chromedriver.exe on your computer:
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.chrome.ChromeDriver;
    
    /**
     * @author Nils Schuette via frontendtest.org
     */
    public class RunTest 
        static WebDriver webDriver;
        /**
         * @param args
         * @throws InterruptedException
         */
        public static void main(final String[] args) throws InterruptedException 
            // Telling the system where to find the chrome driver
            System.setProperty(
                    "webdriver.chrome.driver",
                    "C:/PATH/TO/chromedriver.exe");
    
            // Open the Chrome browser
            webDriver = new ChromeDriver();
    
            // Waiting a bit before closing
            Thread.sleep(7000);
    
            // Closing the browser and WebDriver
            webDriver.close();
            webDriver.quit();
        
    }
    
  5. Save your file, and click on the play button to run your code.
    Run Eclipse project
    Running your first Selenium WebDriver project.
  6. If you have done everything correctly, the code should open a new instance of the Chrome browser and close it shortly thereafter.
    Chrome Browser blank window
    The Chrome Browser opens itself magically. (Large preview)

Testing The WordPress Admin Login

Now I was optimistic that I could automate my first little feature test. I wanted the browser to navigate to one of my WordPress projects, login to the admin area and verify that the login was successful. So, what commands did I need to look up?

  1. Navigate to the login form,
  2. Locate the input fields,
  3. Type the username and password into the input fields,
  4. Hit the login button,
  5. Compare the current page’s headline to see if the login was successful.

Again, after I had done all the necessary updates to my code and clicked on the run button in Eclipse, my browser started to magically work itself through the WordPress login. I successfully ran my first automated website test!

If you want to try this yourself, replace all of the code of your Java class with the following. I will go through the code in detail afterwards. Before executing the code, you must replace four values with your own:

  1. The location of your chromedriver.exe file (as above),

  2. The URL of the WordPress admin account that you want to test,

  3. The WordPress username,

  4. The WordPress password.

Then, save and let it run again. It will open Chrome, navigate to the login of your WordPress website, login and check whether the h1 headline of the current page is “Dashboard.”

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

/**
 * @author Nils Schuette via frontendtest.org
 */
public class RunTest 
    static WebDriver webDriver;
    /**
     * @param args
     * @throws InterruptedException
     */
    public static void main(final String[] args) throws InterruptedException 
        // Telling the system where to find the chrome driver
        System.setProperty(
                "webdriver.chrome.driver",
                "C:/PATH/TO/chromedriver.exe");

        // Open the Chrome browser
        webDriver = new ChromeDriver();

        // Maximize the browser window
        webDriver.manage().window().maximize();

        if (testWordpresslogin()) 
            System.out.println("Test WordPress Login: Passed");
         else 
            System.out.println("Test WordPress Login: Failed");

        

        // Close the browser and WebDriver
        webDriver.close();
        webDriver.quit();
    }

    private static boolean testWordpresslogin() 
        try 
            // Open google.com
            webDriver.navigate().to("https://www.YOUR-SITE.org/wp-admin/");

            // Type in the username
            webDriver.findElement(By.id("user_login")).sendKeys("YOUR_USERNAME");

            // Type in the password
            webDriver.findElement(By.id("user_pass")).sendKeys("YOUR_PASSWORD");

            // Click the Submit button
            webDriver.findElement(By.id("wp-submit")).click();

            // Wait a little bit (7000 milliseconds)
            Thread.sleep(7000);

            // Check whether the h1 equals “Dashboard”
            if (webDriver.findElement(By.tagName("h1")).getText()
                    .equals("Dashboard")) 
                return true;
             else 
                return false;
            

        // If anything goes wrong, return false.
        } catch (final Exception e) 
            System.out.println(e.getClass().toString());
            return false;
        
    }
}

If you have done everything correctly, your output in the Eclipse console should look something like this:

Eclipse console test result.
The Eclipse console states that our first test has passed. (Large preview)

Understanding The Code

Because you are probably a web developer and have at least a basic understanding of other programming languages, I am sure you already grasp the basic idea of the code: We have created a separate method, testWordpressLogin, for the specific test case that is called from our main method.

Depending on whether the method returns true or false, you will get an output in your console telling you whether this specific test passed or failed.

This is not necessary, but this way you can easily add many more test cases to this class and still have readable code.

Now, step by step, here is what happens in our little program:

  1. First, we tell our program where it can find the specific WebDriver for Chrome.
    System.setProperty("webdriver.chrome.driver","C:/PATH/TO/chromedriver.exe");
  2. We open the Chrome browser and maximize the browser window.
    webDriver = new ChromeDriver();
    webDriver.manage().window().maximize();
  3. This is where we jump into our submethod and check whether it returns true or false.
    if (testWordpresslogin()) …
  4. The following part in our submethod might not be intuitive to understand:
    The try…catch… blocks. If everything goes as expected, only the code in try… will be executed, but if anything goes wrong while executing try…, then the execution continuous in catch{}. Whenever you try to locate an element with findElement and the browser is not able to locate this element, it will throw an exception and execute the code in catch…. In my example, the test will be marked as “failed” whenever something goes wrong and the catch{} is executed.
  5. In the submethod, we start by navigating to our WordPress admin area and locating the fields for the username and the password by looking for their IDs. Also, we type the given values in these fields.
    webDriver.navigate().to("https://www.YOUR-SITE.org/wp-admin/");
    webDriver.findElement(By.id("user_login")).sendKeys("YOUR_USERNAME");
    webDriver.findElement(By.id("user_pass")).sendKeys("YOUR_PASSWORD");

    Wordpress login form
    Selenium fills out our login form
  6. After filling in the login form, we locate the submit button by its ID and click it.
    webDriver.findElement(By.id("wp-submit")).click();
  7. In order to follow the test visually, I include a 7-second pause here (7000 milliseconds = 7 seconds).
    Thread.sleep(7000);
  8. If the login is successful, the h1 headline of the current page should now be “Dashboard,” referring to the WordPress admin area. Because the h1 headline should exist only once on every page, I have used the tag name here to locate the element. In most other cases, the tag name is not a good locator because an HTML tag name is rarely unique on a web page. After locating the h1, we extract the text of the element with getText() and check whether it is equal to the string “Dashboard.” If the login is not successful, we would not find “Dashboard” as the current h1. Therefore, I’ve decided to use the h1 to check whether the login is successful.
    if (webDriver.findElement(By.tagName("h1")).getText().equals("Dashboard")) 
        
            return true;
         else 
            return false;
        
    

    Wordpress Dashboard
    Letting the WebDriver check, whether we have arrived on the Dashboard: Test passed! (Large preview)
  9. If anything has gone wrong in the previous part of the submethod, the program would have jumped directly to the following part. The catch block will print the type of exception that happened to the console and afterwards return false to the main method.
    catch (final Exception e) 
                System.out.println(e.getClass().toString());
                return false;
            

Adapting The Test Case

This is where it gets interesting if you want to adapt and add test cases of your own. You can see that we always call methods of the webDriver object to do something with the Chrome browser.

First, we maximize the window:

webDriver.manage().window().maximize();

Then, in a separate method, we navigate to our WordPress admin area:

webDriver.navigate().to("https://www.YOUR-SITE.org/wp-admin/");

There are other methods of the webDriver object we can use. Besides the two above, you will probably use this one a lot:

webDriver.findElement(By. …)

The findElement method helps us find different elements in the DOM. There are different options to find elements:

  • By.id
  • By.cssSelector
  • By.className
  • By.linkText
  • By.name
  • By.xpath

If possible, I recommend using By.id because the ID of an element should always be unique (unlike, for example, the className), and it is usually not affected if the structure of your DOM changes (unlike, say, the xPath).

Note: You can read more about the different options for locating elements with WebDriver over here.

As soon as you get ahold of an element using the findElement method, you can call the different available methods of the element. The most common ones are sendKeys, click and getText.

We’re using sendKeys to fill in the login form:

webDriver.findElement(By.id("user_login")).sendKeys("YOUR_USERNAME");

We have used click to submit the login form by clicking on the submit button:

webDriver.findElement(By.id("wp-submit")).click();

And getText has been used to check what text is in the h1 after the submit button is clicked:

webDriver.findElement(By.tagName("h1")).getText()

Note: Be sure to check out all the available methods that you can use with an element.

Conclusion

Ever since I discovered the power of Selenium WebDriver, my life as a web developer has changed. I simply love it. The deeper I dive into the framework, the more possibilities I discover — running one test simultaneously in Chrome, Internet Explorer and Firefox or even on my smartphone, or taking screenshots automatically of different pages and comparing them. Today, I use Selenium WebDriver not only for testing purposes, but also to automate repetitive tasks on the web. Whenever I see an opportunity to automate my work on the web, I simply copy my initial WebDriver project and adapt it to the next task.

If you think that Selenium WebDriver is for you, I recommend looking at Selenium’s documentation to find out about all of the possibilities of Selenium (such as running tasks simultaneously on several (mobile) devices with Selenium Grid).

I look forward to hearing whether you find WebDriver as useful as I do!

Smashing Editorial
(rb, ra, al, il)


Original link: 

Automating Your Feature Testing With Selenium WebDriver

11 Awesome Popup Design Examples – Scored by The Delight Equation

I admit it. I’m a geek. Or am I a nerd? Definitely not a dweeb, but probably a keener (that’s a Canadian term).

One of my favorite things to do (as a marketer) is to reverse-engineer marketing experiences – good and bad – to define an equation that can be used to score them. It’s primarily a heuristic exercise, but I find it’s an incredibly helpful way to analyze a design, especially when it has the ability to leave you with a simple checklist of things to consider to make it better.

In the past, I’ve created The Clarity Equation (for value propositions), and The Testimonial Equation (for customer social proof).

For today’s post, I focused on popup design examples that exude positive characteristics, to create The Popup Delight Equation.

What Makes a Popup Design Delightful?

Hands up if you thought “That’s an oxymoron.”? I know, I know, how can a popup be delightful? Well, just like any other aspect of marketing and web design, it’s all about the details, and finding those magical ways of combining what makes your brand special, with a dose of responsible interaction design.

I see delightful popups all the time, usually because the copy is hilarious, or the design is surprising.

If your perception of a popup is one of those ugly WordPress template type things with three big green checkmark bullet icons (see below), and a Johnson box (those fat dashed red lines that resemble a coupon cutout), then no, that’s not delightful. That’s just shitty.

It is possible to make a popup delightful, and it’s not that hard if you know which aspects of interaction and visual design are required to do it right. Which brings me to…

The Popup Delight Equation

The equation (shown in the image at the top of the post) is broken down into 7 principles; Clarity, Control, Creativity, Relevance, Charm, Value, & Respect.

Each principle has a few checklist questions that build up a score between 0 and 1 (you can choose 0.5 for any of them if you like) for a maximum score of 7. These are then combined and turned into an overall percentage score as shown below:

EXAMPLE POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
0 1 1 1 0 1 0 57%

I’ll explain each of the delight principles, and then I’ll get to the popup designs.
(skip to the examples)

Principle #1 – Clarity

The clarity principle represents how easy it is to understand the offer presented by the popup. First, there’s the immediacy factor, can you read and understand it very quickly. The second part concerns the use of a primary “hero” image and whether it helps or hinders visual communication.

Clarity = ( Immediacy + Hero ) / 2
Immediacy Can you explain what the offer is after looking at it for only five seconds? Yes 1, No 0
Hero Is there a primary image (not a logo) that shows what you will get (or who you will get it from)? Yes 1, No 0
If it’s a generic site-wide offer like a discount that doesn’t need an image, score 1.

Principle #2 – Control

The control principle represents a visitor’s ability to fully control the experience. This includes being able to easily accept, reject, or discard the interruption.

Control = ( Close [On] + Close [Out] + Close [Esc] + Continue + Cancel ) / 5
Close [On] Is there a close button (typically an x) on the popup? Yes 1, No 0
If it’s a fullscreen “Welcome Mat” you can take a 1 here unless there’s no “No thanks” button.
Close [Out] Does the popup close if you click on the background surrounding it? Yes 1, No 0
If it’s a fullscreen “Welcome Mat” you can take a 1 here.
Close [Esc] Does the popup close if you press the escape button on your keyboard? Yes 1, No 0
Continue Is it clear what you need to click in order to accept the offer? Yes 1, No 0
Cancel Is it clear what you need to click in order to decline the offer? (Score 1 if there’s only one option) Yes 1, No 0

Principle #3 – Creativity

Like any type of marketing communications, a creative popup will be more likely to be well received. This principle is comprised of visual design esthetic, the inclusion of (non-tacky) animation, and how on-brand it is.

Creativity = ( Design + Animation + Brand ) / 3
Visual Design Esthetic Is it unique looking (non-rectangle), or just look awesome to you (some subjectivity is okay here)? Yes 1, No 0
Animation Does it include some motion as it appears that makes it more noticable. Yes 1, No 0.5, Yes, but it’s annoying 0
On Brand Does it match the site’s design or look like a cheap template that could be from any site? Yes 1, No 0

Principle #4 – Relevance

A popup that isn’t highly relevant will convert poorly and moves you closer to the wrong end of the interruption spectrum. This principle includes congruence (how aligned the offer is with the page you are visiting) and targeting.

Relevance = ( Congruence + Targeting ) / 2
Congruence Does the offer feel related to the page you’re on? Yes 1, No 0
If it’s somethng like a site-wide discount it’s a 1, but if it’s a blog subscribe popup on a homepage, product or pricing page etc. (not your blog), that’s a 0.
Targeting Score 1 unless one of these scenarios is true: it doesn’t apply to you (such as wrong country), or it’s referring to you coming from a page/partner/place that you didn’t come from (and in general if it’s making assumptions about you that are incorrect), in which case it’s a 0

Principle #5 – Charm

You know a charming marketing experience when you see one. Same goes for popups. If the design and/or copy make you laugh, or smile, or want to share it with someone, it’s a winner.

Charm = ( Smile [Design] + Smile [Copy] ) / 2
Smile [Design] Does the visual design make you smile? Yes 1, No 0
Smile [Copy] Does the copywriting make you smile? Yes 1, No 0

Principle #6 – Value

Some popups only contain information, some have a discount, others ask you for personal information in order to claim the offer. The value principle is concerned with how fair of an exchange it is, and it’s completely binary. If the reward is equal or greater than the ask/effort, you win.

Value = ( Reward >= Ask )
Reward > Ask Is the offer worth more than or equal to the requested information/effort? Yes 1, No 0
Score a 0 if it seems unfair, such as a ton of form fields for very little in return.

Principle #7 – Respect

The respect principle leans on the concept of “a responsible use of technology”. The biggest offense in this regard is the idea of “Confirm Shaming”. This is where there are two options (continue or cancel), but in order to cancel, you have to click a button/link with offensive copy – such as “I don’t like free money”. You get penalized extra for this offense.

Respect = 1 – 2*(Confirm Shaming)
Confirm Shaming If this is a two-button Accept/Decline popup, and the decline button is offensive in any way, it’s confirm-shaming. Yes 1, No 0
A 1 here results in a -1 score for principle 7.

Mid-post call to action: click here to subscribe to the weekly updates.


Brands Appearing in Today’s Popup Design Examples

Thanks to these awesome companies/people for inspiring me to include them: Tim Ferriss, Leesa, ClassPass, How-To Geek, Groupon, Tasting Table, Get Response, Lemonstand, PetSmart, Travelzoo.

Note: None of these popup designs score 100%

I’m sure you’ll like some, and dislike others. I’m including a wide variety of examples because they each show different aspects of the delight criteria.

Popup Design #1: Tim Ferriss

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
0.75 0.8 1 0.5 0.5 1 1 83%

Analysis

This fullscreen “Welcome Mat” popup takes over the screen when you’re leaving. I dislike this style when it happens when you arrive, but on exit, it’s totally cool. It’s a simple and classy design. Let’s score it!

  • CLARITY:
    I gave it 0.5 for immediacy as I had to figure out what the content was (fortunately I just bought a book about Seneca so I caught on). Having Tim in the background makes it very clear it’s coming from him.
  • CONTROL:
    The only failing here is the lack of the escape button working, which is my favourite way of dismissing a popup (I’m a big keyboard shortcut fan). It’s much faster than hunting for a close icon/button.
  • CREATIVITY:
    I love the design. It’s fresh and open. The visual hierarchy of the buttons is perfect: dominant continue, secondary cancel.
  • RELEVANCE:
    It loses out a bit on relevance, as it’s a speaker contact page, making this popup incongruent.
  • CHARM:
    Visually, yes. His authentic smile makes you feel welcome.
  • VALUE:
    It’s a 2-step opt-in form (email address if you click “Unlock”), which is a fair deal.
  • RESPECT:
    “No thanks, I’m not interested.” is great. It’s all you need to do on your cancel button. No confirm shaming here.

Popup Design #2: Leesa Mattress – Countdown Timer

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 1 0.83 1 0 1 1 80%

Analysis

There are so many mattress 2.0 companies out there now, it’s hard to tell them apart aside from the colour. This one’s really plain, and quite boring, but it does get bonus points for the countdown timer, and not breaking any of the fundamental delight rules.

  • CLARITY:
    Easy.
  • CONTROL:
    Full control.
  • CREATIVITY:
    It got it’s creativity 1/3 only for being on brand, but I added a 0.5 bonus for the countdown timer, which is a nice touch for ecommerce.
  • RELEVANCE:
    Timely and on point.
  • CHARM:
    Nah. They could do way more with the copy and the visuals are kinda bleh.
  • VALUE:
    Hard to argue with a discount.
  • RESPECT:
    No problems here.

Popup Design #3: Tasting Table

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 0.8 0.17 1 0 1 1 71%

Analysis

I like the use of a question headline in this popup. If you aren’t then you probably shouldn’t be on the site, so they’re helping to self select their ideal customer/subscriber. I’m not a foodie, however, so I’m closing it ;)

  • CLARITY:
    Get an email, about food. Easy.
  • CONTROL:
    No escape button close on this one either. Grrr.
  • CREATIVITY:
    It gets a few points for being on brand, but nothing original otherwise.
  • RELEVANCE:
    It’s food.
  • CHARM:
    Lots of potential, but doesn’t deliver.
  • VALUE:
    I was going to ding it for asking for a zipcode, but it probably increases the value so it get’s a pass.
  • RESPECT:
    Great.

Popup Design #4: Get Response

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 1 0.67 1 1 1 1 95%

Analysis

Simple and a bit weird (and basic) looking, but it rocks the scores beacuse it doesn’t break the fundamental delight rules, and adds some playfulness to stand out. Give it a little wiggle animation to go with that cute little alien thing and it would get a perfect score.

  • CLARITY:
    Pretty clear, and they get a few extra seconds of reading because it’s cute.
  • CONTROL:
    Full control.
  • CREATIVITY:
    Not the slickest design, but I think it’s got a lot of fun in it.
  • RELEVANCE:
    It’s SaaS, and this is for a free trial. Totally relevant.
  • CHARM:
    This one made me smile based on the copy and the design. Nicely done.
  • VALUE:
    It’s no different than clicking any other signup button on the site, so it’s regular ol’ fair.
  • RESPECT:
    Yes.

A quick contrast break…

Some pretty amazing score so far, and that’s because they’re doing it right. Before I continue, I just want to run one of the examples from yesterday’s “6 Really Bad Website Popup Examples” post through The Popup Delight Equation to provide some perspective.

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
0.5 0.6 0 0 0 0 1 30%

NOT delightful.

Popup Design #5: Groupon

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
0.75 0.4 0.67 1 0 1 1 69%

Analysis

  • CLARITY:
    I would’ve given it a higher score if there had been a photo of Vancouver in the popup, as it gives that immediate sense of locale.
  • CONTROL:
    Neither the escape key or clicking the background close the popup, which is really annoying when the “No thanks” link is so tiny. I dinged it extra for that.
  • CREATIVITY:
    This is what I’m referring to re: looking different from a shape perspective. Yes, it’s a circle and not a rectangle, but that’s the point. 99.999999% of popups are rectangles. So this simple change makes a world of difference. And the transparency allows lots of breathing room, and for it to not look like it’s completely shutting out the site.
  • RELEVANCE:
    Perfect.
  • CHARM:
    None.
  • VALUE:
    Hard to argue with deals.
  • RESPECT:
    Good job.

Popup Design #6: How-To Geek

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 1 0.17 1 0.25 1 1 77%

Analysis

I bet you didn’t expect a score like that. Which just goes to show that when you do some of the fundamentals correctly: it’s very clear, it’s easy to control, relevant, fair value, and respectful. It looks pretty awful, but that’s why it scores so poorly on creativity and charm. The fundamentals matter a lot. Get those right, and you can spend your time being exceptional.

  • CLARITY:
    Super obvious.
  • CONTROL:
    All functional.
  • CREATIVITY:
    On brand but nothing else positive from a creative standpoint.
  • RELEVANCE:
    Yup.
  • CHARM:
    I gave it a tiny bit cos of the nerdy logo guy.
  • VALUE:
    Standard newsletter value.
  • RESPECT:
    All good.

Popup Design #7: ClassPass

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
0.5 0.4 0.33 1 0 1 1 60%

Analysis

I thought this would do better when I first saw it, then after playing with the interaction it let me down a bit.

  • CLARITY:
    This is an entry popup, so the visuals are covered. Having a photo in the popup would help with the clarity around what kind of class they’re talking about for a first-time visitor.
  • CONTROL:
    no on, out or esc. The reason having no visible close button is undelightful is because it forces you to choose (and read) one of the buttons to close it. That’s too much effort when I’ve decided I want to get rid of it.
  • CREATIVITY:
    On brand, nothing else.
  • RELEVANCE:
    Yes.
  • CHARM:
    A bit cold.
  • VALUE:
    Without question.
  • RESPECT:
    Good job.

Popup Design #8: Lemonstand – Squishy Animation

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 1 0.67 1 0.25 1 1 85%

Analysis

I stuck an animated GIF in for this one so you could see the animation. It’s a prety plain looking popup aside from that, but you can see how it does add that extra attention-grabbing effect.

  • CLARITY:
    Ebook with an image of a book. Done.
  • CONTROL:
    Full control.
  • CREATIVITY:
    Scores for animation and being on brand. Mix in a different shape or a design like a lemon stand for bonus points :D
  • RELEVANCE:
    It’s on the blog, so full points.
  • CHARM:
    Only the squishy animation saves it here.
  • VALUE:
    Fair indeed.
  • RESPECT:
    No confirm shaming here.

Popup Design #9: PetSmart

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 1 0 1 0 1 1 71%

Analysis

Granted, this is the lamest of the bunch, but I included it because of its simplicity. Sometimes an offer is just an informative statement.

  • CLARITY:
    Crystal.
  • CONTROL:
    Complete.
  • CREATIVITY:
    Nope. Sorry.
  • RELEVANCE:
    It’s an ecommerce store. Yes.
  • CHARM:
    Nope. Add some kittens!
  • VALUE:
    Definitely.
  • RESPECT:
    All good.

Popup Design #10: Travelzoo << The worst!

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 0 0.67 1 0 0 -1 24%

Analysis

Looks sure can be deceiving. At first glance I really like this one. Then I started playing with it. And it became the worst popup of them all.

  • CLARITY:
    Yep, super clear with the photo of Ireland.
  • CONTROL:
    Can’t click the background to close. Oh, and wait, no matter what you do, IF you manage to close it you get turfed to the homepage. Horrible.
  • CREATIVITY:
    Minor points for the rounded corners.
  • RELEVANCE:
    Very.
  • CHARM:
    Started with zero, got worse from there.
  • VALUE:
    See respect, below.
  • RESPECT:
    Wow. If I were critiquing this solely on a screenshot, I’d have given them a 1 for respect. But I just tried to interact with it. If you close the popup (without signing up) it redirects you right back to the homepage. You can’t even see the deal. That’s seriously gnarly. Shoulda put this one in yesterday’s post.

Popup Design #11: Tim Ferriss

POPUP DELIGHT SCORE
CLARITY CONTROL CREATIVITY RELEVANCE CHARM VALUE RESPECT TOTAL
1 0.6 0.67 1 0.5 1 0.5 75%

Analysis

We close it out with another from Mr. Ferriss. It’s from the same page as the first one, but instead of being an exit popup, it’s triggered when you click a small banner that appears in the lower-left as you scroll down the page. Because it’s an on-click triggered popup, you typically get full points for relevance and clarity as you asked for it specifically.

  • CLARITY:
    Super clear
  • CONTROL:
    No escape key function, and the close (x) button doesn’t always show up.
  • CREATIVITY:
    Looks great,and on brand.
  • RELEVANCE:
    Perfect.
  • CHARM:
    As before, the friendly photo works.
  • VALUE:
    As expected.
  • RESPECT:
    Not quite as nice as the other one on the cancel link, so I’m dinging him a little.

Alrighty then, that’s a wrap for those 10 delightful popups, and one most certainly not delightful (Travelzoo) popup. Let me know if you agree/disagree with my ratings.

How Delightful are Your Popups?

I showed you mine, now show me yours! I hope you enjoyed learning about the delightful side of the website popup. I’d really love to see some of your popups, and how you score them, so drop a URL in the comments with your score and we can see if I agree.

Cheers
Oli

p.s. Don’t forget to subscribe to the weekly updates.

This article is from – 

11 Awesome Popup Design Examples – Scored by The Delight Equation

The Front-End Performance Challenge: Make Your Site Blazingly Fast And Win Some Smashing Prizes

Not too long ago, front-end performance was a mere afterthought. Something that was postponed to the end of a project and that didn’t go much beyond minification, asset optimization, and maybe a few adjustments on the server’s config file. But things have changed. We have become more conscious of the impact performance has on the user experience, and the tools and techniques that help us cater for snappy experiences have improved and are widely supported now as well.

Source article: 

The Front-End Performance Challenge: Make Your Site Blazingly Fast And Win Some Smashing Prizes

Introducing Term Meta Data In WordPress And How To Use Them


WordPress 4.4 introduced term meta data which allows you to save meta values for terms in a similar way to post meta data. This is a highly anticipated and logical addition to the WordPress system.

Introducing Term Meta Data In WordPress And How To Use Them

So far, the post and comment meta systems allowed us to add arbitrary data to posts and comments. This can be used to add ratings to comments, indicate your mood while you were writing a post, attach prices to product posts, and various other information you think is relevant to your content. As of the newest version of WordPress, meta data can now be added to terms which allows us to create features like default category thumbnails in a standardized way. This tutorial will show you how you can edit, update and retrieve these meta data for terms.

The post Introducing Term Meta Data In WordPress And How To Use Them appeared first on Smashing Magazine.

Originally posted here:

Introducing Term Meta Data In WordPress And How To Use Them

The Challenges And Rewards Of Teaching Web Design

Just over four years ago, I decided to take a part-time position teaching website design and front-end development at a local university, the University of Rhode Island. My time in the classroom has been one of the most challenging as well as one of the most rewarding experiences in my career, and I believe that other Web professionals would greatly benefit from spending some time in an educational setting teaching others their craft.

Link to original: 

The Challenges And Rewards Of Teaching Web Design

Challenging CSS Best Practices

Editor’s Note: This article features techniques that are used in practice by Yahoo! and question coding techniques that we are used to today. You might be interested in reading Decoupling HTML From CSS by Jonathan Snook, On HTML Elements Identifiers by Tim Huegdon and Atomic Design With Sass by Robin Rendle as well. Please keep in mind: some of the mentioned techniques are not considered to be best practices.

Link:

Challenging CSS Best Practices

Thumbnail

Introducing LiveStyle: Better, Stronger And Smarter CSS Live Reload

In the past, we featured some exciting tools and libraries: PrefixFree, Foundation, Sisyphus.js, GuideGuide, Gridpak, JS Bin and CSSComb. All of them have been developed and released by active members of the Web design community as open-source projects. Today, we present LiveStyle, a plugin for live bi-directional (editor ↔ browser) CSS editing of the new generation! — Ed.
Tools for live CSS editing aren’t new these days. You may already be familiar with tools like LiveReload, CodeKit and Brackets.

This article is from: 

Introducing LiveStyle: Better, Stronger And Smarter CSS Live Reload

How To Teach Web Design To New Students In Higher Education

The Web is evolving rapidly. Front-end Web development has been majorly affected by recent changes in coding techniques and approaches. In 2003, a competent front-end Web developer would have known HTML and CSS, possibly with a bit of copy-and-pasted JavaScript, and they built websites that would be viewed on desktop computers.
Not so in 2013! Now, a competent front-end Web developer is well-versed in HTML and CSS, JavaScript and jQuery, CSS preprocessors, new techniques such as responsive design and mobile first, and a world of new devices for viewing websites.

More – 

How To Teach Web Design To New Students In Higher Education

How To Create A Twitter Widget

Twitter needs no introduction. It has become the way to reach audiences for some people and companies and a place to hang out for others. Placing a Twitter feed on one’s website has almost become compulsory. Embedding a feed isn’t all that difficult if you are comfortable with Twitter’s default widget, but making your own will enable you to blend it into your website seamlessly.

The Result The result of our effort will be a WordPress widget that can be placed in a widgetized sidebar.

See the article here – 

How To Create A Twitter Widget

Coding Q&A: CSS Performance, Debugging, Naming Conventions

Howdy folks! Welcome to another round of Smashing Magazine CSS Q&A — the final one, as of now. One more time, we’ll answer the best questions which you sent us about CSS.
It was a great experience to run this Q&A with you – thanks a lot for sharing all your questions with us! We hope we answered them at the best possible, and we’ll surely be back with new and exciting Q&A rounds in the future.

Visit site:  

Coding Q&A: CSS Performance, Debugging, Naming Conventions