About

QA automation engineer by trade (and hobby), Selenium user who has also made some contributions to areas of Selenium, like the PHP WebDriver bindings on Google Code (with a fork on GitHub), as well as Selenium tips & tricks documented on this blog.

While the blog is currently focused on Selenium, I blog a variety of topics around test automation, and sometimes on occasion, other stuff.

6 Responses to “About”

  1. Rajesh May 28, 2013 at 6:45 am #

    Hi, I am facing the same mouseover issue in Safari. I tried your solution but its not working.
    I am having 5.1.7 windows safari version. Can you help me in this issue.

    JavascriptExecutor js = (JavascriptExecutor) driver;
    String mouseOverScript = “if(document.createEvent){var evObj = document.createEvent(‘MouseEvents’);evObj.initEvent(‘mouseover’, true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent(‘onmouseover’);}”;
    WebElement someElem = driver.findElement(By.className(“selectSkuSwatch”));
    js.executeScript(mouseOverScript, someElem);

    • autumnator May 28, 2013 at 6:02 pm #

      Do you have a public site or saved HTML file(s) to reproduce this issue? The mentioned code technique has worked for me. Some tips to consider: Safari executes rather fast, so for mouse over verification or what comes after the mouse over, you may want to add a delay/sleep so that you can visually see the mouse over or for the action (some click of link that is now present after mouse over, check element present, etc.) can take effect accordingly, since w/o the delay, the hover may run too fast for the subsequent action to work correctly. Another to check is that make sure your “selectSkuSwatch” element by class name returns exactly one element (check with Firebug/FirePath, etc. by verifying with XPath or CSS selector). If it’s more than 1, make sure it is returning the correct one, otherwise you might be hovering over the wrong element.

      • kandidraj May 30, 2013 at 2:30 am #

        Can you please try in this site “www.staples.com”, i want to mousehover on the my account menu. I really appreciate your help..

        JavascriptExecutor js = (JavascriptExecutor) driver;
        String mouseOverScript = “if(document.createEvent){var evObj = document.createEvent(‘MouseEvents’);evObj.initEvent(‘mouseover’, true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent(‘onmouseover’);}”;
        WebElement someElem = driver.findElement(By.id(“myAccountNavButton”));
        js.executeScript(mouseOverScript, someElem);

      • autumnator June 1, 2013 at 3:56 am #

        Sorry, can’t help you much. I tried with my framework which is just a wrapper to the code you listed, it didn’t work for me either. It looks like you have the right element locator or it could be the “a” hyperlink tag inside the “myAccountNavButton” div. The mouseOver script has worked for the websites I test at work. I would think that either Staples has complex javascript UI that triggers something else where the mouse over event (when simulated) wouldn’t trigger this same thing OR we’re trying to trigger the event off the wrong element. If it’s the latter case, just need to figure out what’s the right element to trigger with. If the former, you don’t have much luck other than consulting the developers of Staples.com or use the native Actions/Interactions API for mouse actions rather than javascript. Do you work for Staples and why didn’t you use the native actions API to start with? Javascript is a fallback option in case the native option fails.

  2. kandidraj June 3, 2013 at 4:44 am #

    The reason to use Javascript is the Native option failed in Safari. I too tested in different sites, the javascript mouse over was working fine. The element we are using to mouse over is also fine bcos its works well in other browsers. As you suggested, i think we need to contact developers.. Thanks a lot for your support…

  3. Michael Wowro August 25, 2015 at 8:39 pm #

    Hi David,

    I moved my blog to http://www.it-kosmopolit.de now. I’d be happy to be followed by you again 🙂

    Yours Michael

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Seek Nuance

Python, technology, Seattle, careers, life, et cetera...

TELLURIUM

New Era of Test Automation

Der Flounder

Seldom updated, occasionally insightful.

The 4T - Trail, Tram, Trolley, Train

Exploring Portland with the 4T

Midnight Musings

Thoughts on making art

Automation Guide

The More You Learn The More You Play...!

The Performance Engineer

Code.Test.Tune.Optimize.

humblesoftwaredev

Thoughts related to software development

Yi Wang's Tech Notes

A blog ported from http://cxwangyi.blogspot.com

Appium Tutorial

Technical…..Practical…..Theoretically Interesting

LinuxMeerkat

I swear! Meerkats can do Linux

PacketsDropped

Requeuing the packets dropped in my memory.

Two cents of software value

Writing. Training. Consulting.

@akumar overflow

wisdom exceeding 140 chars.

Lazy Programmer's Shortcut

Java, J2EE, Spring, OOAD, DDD & LIFE! .......all in one :)

Testing Mobile Apps

www.SoftwareTestingStudio.com

Photofocus

education and inspiration for visual storytellers

%d bloggers like this: