Top 27 Selenium Rc Interview Questions
Q1. What Is The Difference Between Thread.Sleep() And Selenium.Setspeed()?
Selenium.SetSpeed
takes a unmarried argument in string format
ex: selenium.SetSpeed("2000") - will wait for 2 seconds
Runs each command in after setSpeed put off by using the range of milliseconds referred to in setSpeed.
Thread.Sleep:
takes a single argument in integer format
ex: thread.Sleep(2000) - will wait for two seconds
Waits for simplest as soon as at the command given at sleep.
Q2. What Is Selenium Rc (faraway Control)?
Selenium IDE have limitations in terms of browser help and language assist. By the usage of Selenium RC drawback may be faded.
On distinctive platforms and distinct internet browser for automating web software selenium RC is used with languages like Java, C#, Perl, Python.
Selenium RC is a java based and using any language it could interact with the net utility.
Using server you can pass the restriction and run your automation script strolling in opposition to any web utility.
Q3. What Are The Advantages Of Rc?
Advantages of RC are:
Can study or write records from/ to .Xls, .Txt, and many others
It can manage dynamic objects and Ajax based UI factors
Loops and situations can be used for better overall performance and versatility
Support many Programming languages and Operating Systems
For any JAVA script enabled browser Selenium RC can be used
Q4. Why Do You Use Assert And Verify Statements In Selenium Rc Without Referring To Selenium?
SeleneseTestCase is the class that is having
AssertTrue
VerifyTrue
AssertEquals
VerifyEquals
We use SeleneseTestCase class to extend the selenium check class file.
For Ex: the test class is declared as follows
public elegance BookFlightSel1 extends SeleneseTestCase
In the above example SeleneseTestCase is the bottom class and BookFlightSel1 is the derived magnificence. So, we will at once name and use the parent magnificence strategies confirm and assert with out instantiating the magnificence in BookFlightSel1 elegance.
Q5. Using Selenium How Can You Handle Network Latency?
To manage community latency you may use driver.Manipulate.Pageloadingtime for community latency.
Q6. To Enter Values Into Text Boxes What Is The Command That Can Be Used?
To enter values into text boxes we can use command sendkeys().
Q7. What Are The Technical Limitations While Using Selenium Rc?
Apart from “identical foundation policy” restriction from js, Selenium is likewise restrained from workout anything this is outside browser.
Q8. Explain What Is Framework And What Are The Frameworks Available In Rc?
A series of libraries and instructions is known as Framework and they're useful when testers has to automate take a look at instances. NUnit, JUnit, TestNG, Bromine, RSpec, unittest are a number of the frameworks available in RC .
Q9. Which Are The Annotations Generated With Junit 4 Tests In Selenium Ide?
The annotations generated with JUnit 4 tests in Selenium are:
@Before public void method(): Will perform the technique() before each take a look at. This technique can prepare the take a look at
@Test public void technique(): Annotation @Test identifies that this method is a take a look at approach.Surroundings, e.G. Read enter information, initialize the magnificence)
@After public void method():Test approach ought to start with test@Before - this annotation is used for executing a way earlier than.
Q10. Explain How You Can Capture Server Side Log Selenium Server?
Java –jar .Jar –log selenium.Log
Q11. Tell Me What Are The Prerequisites To Run Selenium Rc Tests With Junit?
The stipulations to run Selenium RC checks with Junit:
Jre 1.Five or better model wishes to be mounted
/jre/bin folder need to be introduced in surroundings variable "course"
Junit folder course must be delivered to course or build course in eclipse
Selenium Java Client drivers wishes to be delivered to the route for execution
Q12. How To Start Selenium Rc Server With User Extensions?
The command used is
java -jar selenium-server.Jar - Extensions person-extensions.Js
Note: In this situation, the java script report consumer-extensions.Js file call should always constant. If the call or extension is changed the selenium rc server will no longer start.
Q13. How Do You Identify An Object Using Selenium?
To perceive an item using Selenium you can use isElementPresent(String locator) isElementPresent takes a locator because the argument and if discovered returns a Boolean.
Q14. What Are The Challenges With Selenium Rc Test Suites When Running In Junit?
The challenges with Selenium RC take a look at suites when going for walks in JUnit
Each take a look at case of Selenium RC check will invoke the browser and closes after gambling lower back
All the Test instances can't run on a unmarried browser consultation
If there may be any dependency between the test cases, it's far very hard to execute
Running the check suites in junit could be beneficial for best unbiased take a look at cases.
Note: The based check case associated problems may be addressed with the aid of the use of TestNG with junit
Q15. How Selenium Grid Hub Keeps In Touch With Rc Slave Machine?
At predefined time selenium grid hub maintains polling all RC slaves to ensure it is to be had for trying out. The figuring out parameter is known as “remoteControlPollingIntervalSeconds” and is defined in “grid_configuration.Yml”document.
Q16. Which Is The Command Used For Running The Selenium Rc Server?
The process observed to run the Selenium RC Server is:
Open the command activate.
Change the folder course to Selenium RC Server
Issue the command "java -jar selenium-server.Jar"
Q17. How To Run Test Cases With Dependent In Selenium Using Testng?
The @Test should be accompanied by using (dependsOnMethods = "testLogin")
Note:- The take a look at case can be finished after the testLogin case
Ex: @Test(dependsOnMethods = "testLogin")
Q18. Why To Use Testng With Selenium Rc ?
If you need complete automation in opposition to unique server and purchaser structures, You need a way to invoke the tests from a command line manner, reports that tells you what befell and versatility in how you create your test suites. TestNG offers that flexibility.
Q19. How To Run The Test Cases In Group In Selenium Using Testng?
Test instances in institution in Selenium the use of TestNG will be completed with the underneath alternatives.
If you need to execute the take a look at cases based on one of the institution like regression check or smoke test
@Test(agencies = "regression test", "smoke test")
Q20. Other Than The Default Port 4444 How You Can Run Selenium Server?
You can run Selenium server on java-jar selenium-server.Jar-port apart from its default port.
Q21. How To Run Selenium Commands In Slow Motion In Selenium Rc?
You can run the selenium commands in RC gradual motion by two ways:
selenium.SetSpeed
thread.Sleep
Q22. Why Selenium Rc Is Used?
Selenium IDE does not directly aid many capabilities like circumstance statements, Iteration, logging and reporting of take a look at effects, sudden mistakes managing and so forth as IDE supports most effective HTML language. To handle such troubles Selenium RC is used it helps the language like Perl, Ruby, Python, PHP the use of those languages we will write this system to achieve the IDE issues.
Q23. What Are The Limitations Of Selenium Rc?
The obstacles of selenium RC are:
Switching among the a couple of instances of the same browser isn't always viable.
Switching among the a couple of instances of the specific browsers isn't feasible.
Browser navigation, like again and forward button emulations is not feasible.
Limited functions in phrases of drag and drop of items.
To work with Ajax based totally UI factors there are very restrained functions are there with Selenium RC.
To conquer the above limitations we use selenium web driving force or google internet motive force.
Q24. What Are The Basic Annotations Used To Run Testng Tests In Selenium?
The fundamental annotations used to run TestNG checks in Selenium RC:
@BeforeClass: The annotated approach with @BeforeClass can be run earlier than the primary test approach in the current magnificence is invoked.
@AfterClass: The annotated method with @AfterClass can be run after all the test techniques within the current elegance have been run.
@BeforeMethod: The annotated method with @BeforeMethod can be run earlier than each take a look at approach.
@AfterMethod: The annotated method with @AfterMethod could be run after each check technique.
@Test: Marks a category or a method @Test with as a part of the take a look at.
Q25. How Can We Handle Pop-usaIn Rc ?
To handle pop-americain RC , the use of selectWindow method, pop-up window might be selected and window Focus approach will allow the manage from present day window to pop-up home windows and carry out movements according to script.
Q26. Can We Use Selenium Rc To Drive Tests On Two Different Browsers On One Operating System Without Selenium Grid?
Yes, it's far possible whilst you are not using JAVA trying out framework. Instead of the usage of Java checking out framework in case you are the use of java customer driver of selenium then TestNG lets in you to do that. By the use of “parallel=take a look at” characteristic you could set exams to be accomplished in parallel and can outline two exceptional checks, each the use of unique browser.
Q27. Explain What Is The Main Difference Between Web-driver And Rc ?
The predominant distinction between Selenium RC and Webdriver is that, selenium RC injects javascript function into browsers while the web page is loaded. On the other hand, Selenium Webdriver drives the browser the usage of browsers built in help.

