Selenium Interview Question-6
67) What if you have written your own element locator
and how would you test it?
To test the locator one can use “Find Button” of Selenium IDE,
as you click on it, you would see on screen an element being highlighted
provided your element locator is right or or else an error message will be
displayed
68) What is regular expressions? How you can use
regular expressions in Selenium ?
A regular expression is a special text string used for
describing a search pattern. In Selenium IDE regular expression can be used
with the keyword- regexp: as a prefix to the value and
patterns needs to be included for the expected values.
69) What are core extension ?
If you want to “extend” the defualt functionality provided by
Selenium Function Library , you can create a Core Extension. They are also
called “User Extension”. You can even download ready-made Core Extension
created by other Selenium enthusiats.
70) How will you handle working with multiple windows
in Selenium ?
We can use the command selectWindow to switch
between windows. This command uses the title of Windows to identify which
window to switch to.
71) How will you verify the specific position of an
web element
You can use verifyElementPositionLeft &
verifyElementPositionTop. It does a pixel comparison of the position of the
element from the Left and Top of page respectively
72) How can you retrive the message in an alert box ?
You can use the storeAlert command which will fetch the message
of the alert pop up and store it in a variable.
73) What is selenium RC (Remote Control)?
Selenium IDE have limitations in terms of browser support and
language support. By using Selenium RC limitation can be diminished.
·
On different platforms and different web browser for
automating web application selenium RC is used with languages like Java,
C#, Perl, Python
·
Selenium RC is a java based and using any language it can
interact with the web application
·
Using server you can bypass the restriction and run your
automation script running against any web application
74) Why Selenium RC is used?
Selenium IDE does not directly support many functions like
condition statements, Iteration, logging and reporting of test results,
unexpected error handling and so on as IDE supports only HTML language.
To handle such issues Selenium RC is used it supports the language like
Perl, Ruby, Python, PHP using
these languages we can write the program to achieve the IDE issues.
75) Explain what is the main difference between web-driver
and RC ?
The main difference between Selenium RC and Webdriver is that,
selenium RC injects javascript function into browsers when the page is loaded.
On the other hand, Selenium Webdriver drives the browser using browsers built
in support
76) What are the advantages of RC?
Advantages of RC are
·
Can read or write data from/ to .xls, .txt, etc
·
It can handle dynamic objects and Ajax based UI elements
·
Loops and conditions can be used for better performance and
flexibility
·
Support many Programming languages and Operating Systems
For any JAVA script enabled browser Selenium RC can be used
Comments
Post a Comment