Search This Blog

Wednesday, November 16, 2011

Key press events using selenium RC

To handle key press events like to press page down, tab key or other keys selenium RC supports this by passing ASCII code of keys to keyDownNative function.

Syntax:

keyDownNative(String keycode);

Example:
  • For page down/scroll: keyDownNative("32"); //32 is ASCII code for space bar.
  • To press tab key: keyDownNative("9"); // 9 is ASCII code for Tab. 

Wednesday, November 9, 2011

Handling alert, prompt and confirmation box using Selenium RC

This article explain about how to deal with java script alert, prompt and confirmation box.

Copy below html code and save it as test.html.

<html>
<head>
<script type="text/javascript">

How to shutdown selenium server?

Tuesday, November 8, 2011

Selenium RC Interview Questions

Below are the list of interview questions on selenium RC. Post in comments if anyone need answers for any questions.
  1. What version of Selenium RC you are using?
  2. How Selenium RC works at core components level?
  3. What all languages and browsers that Selenium RC supports?
  4. How you start selenium server?
  5. What are different Start modes of Selenium RC?
  6. When to use proxy injection mode?
  7. How you handle SSL or HTTPS using selenium RC?
  8. How to automate Flash based applications?
  9. Explain about your automation framework
  10. How to handle alerts and pop up?
  11. How to handle Modal dialog?
  12. How to handle AJAX components?
  13. How you upload a file?
  14. How you click on scroll bar button in web application?
  15. Which 3rd party tools/add-ons you use for identifying object identifiers?
  16. How you manage object repository?
  17. How to extend selenium RC for user defined functions?
  18. Is it possible to select a text and compare text?
  19. Have you ever automated Localization test cases using selenium RC?
  20. Major differences/enhancements between Selenium RC and Web driver?
  21. How to navigate to parent tag from a child tag in xpath?
  22. How to navigate to sibling node in xpath?
  23. What are major problems you encountered during automation? and you resolved?
  24. How to connect to excel sheet for test data reading?
  25. Which locator strategy is faster? Xpath or CSS why?
  26. What are different locator strategies exists?
  27. Which reported tool or component you used?
  28. How logging handled in your automation framework?
  29. What are user extension in selenium rc?
  30. How you update selenium server jar if needed?
  31. Is it possible to capture screen shot when system is turned to stand by mode?
  32. How test case dependency handled in your framework?
  33. Can selenium used to measure performance of web application?
  34. Explain getEval and runscript functions.
  35. How you handle auto complete search in selenium rc automation?

Sunday, October 30, 2011

Dealing with SSL certificate error or Https using Selenium RC

As all understand about need of SSL or Https for web applications, not stressing on concept of SSL. Basically need of SSL is to securely transmit sensitive data over the web. 


With out valid SSL certificate browsers prompted users with certificate error page as browser not trusted this site and certificate is not valid. And this is common when comes to automation also. 

Friday, October 28, 2011

Selenium RC getEval tutorial and examples.

Using selenium getEval we can achieve many tasks which are not possible to achieve normally. To achieve this  Selenium RC provided with getEval function.

Syntax:

getEval("javascript code as string"); It returns result of Java script.

Let's have simple example first, below example written using Junit but you can convert getEval script it to your preferred language as it is.


Thursday, October 27, 2011

Identify Iframe and dealing problems with IFRAME using Selenium RC


When you choose Selenium RC for web automation one need to actually evaluate to ensure whether Selenium fit to your application technology or not. Based on need one can eitehr incldue AJAX, IFRAME, Flash etc for better user interface. Adding such technolgies cause hurdles for automation engineers. Though there are many built in functions to support for Selenium RC. But for some issues we need tweak selenium RC to overcome such problems.

Tuesday, February 22, 2011

Handling File upload using selenium.

Here I would like to share my experience on handling file upload using selenium.

To handle file upload using selenium RC (1.0 or higher) comes with two challenges.

1. Clicking on Browse/Upload button.
2. Selecting a file from windows dialog.

I will share handling this on both Fire fox and IE.