04 5 / 2010

Selenium Interview Questions with Awesomeness (Part 1)

During the early fall of 2009, I interviewed a number of potential canidates with some expertise in Selenium. Since I already had a dedicated year in using the tool, I gathered up a list of some of my crazy off the cuff questions, presented my wares to upper management ( who’s mantra was “Do it once and Do it right” ), and off I went.

First and foremost, I am not a sadist, but I worked with a team that literally raised the bar on application development, and I wanted to keep the tradition going. Besides, any sign of weakness would have placed me in the flogging room.

I don’t want to talk about the flogging room.

So don’t ask me about the flogging room.

If interested, here’s just a few of the questions I presented, and in the future, I will add a few more.  Think of this as an addendum to the list of Selenium interview questions found here.

Enjoy!

Question: Can you use JavaScript or XPath with Selenium?
Answer: You use both.

Question: Can you distribute test results from Selenium IDE?
Answer: No. Selenium IDE generates test results within the Selenium IDE. Selenium RC allows the tester to distribute hard copy test results.

Question: Construct how you reference a variable in Selenium. Use the echo method.
Answer: echo ${variable_name}

Question: You can place values in variables with a number of Selenium methods. Construct a simple way to place a URL into a variable.
Answer: store http://google.com  myVAR

Question: Can you record a script that prints information a printer with Selenium?
Answer: No. Selenium only works with web applications. However, if the web application is enabled to call the browser specific print feature, then this can be tested with Selenium.

Question: Solve the following, what would be the output of newVAR?

store        2                        myVAR
store        javascript{storedVars[‘myVAR’] + 2        newVAR
echo        ${newVAR}

Answer:  Stick it in Selenium and test it out!

This should be enough to digest for now. I’ll include some more questions in future posts, but right now - Dancing With The Stars is on.

-arterberry-

Reblog this post [with Zemanta]