This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
To Enter Values Into Text Boxes What Is The Command That Can Be Used? |
|
Answer» To ENTER VALUES into TEXT boxes we can use command sendkeys(). To enter values into text boxes we can use command sendkeys(). |
|
| 2. |
How Do You Identify An Object Using Selenium? |
|
Answer» To identify an OBJECT using Selenium you can USE isElementPresent(String LOCATOR) isElementPresent takes a locator as the argument and if found returns a Boolean. To identify an object using Selenium you can use isElementPresent(String locator) isElementPresent takes a locator as the argument and if found returns a Boolean. |
|
| 3. |
Using Selenium How Can You Handle Network Latency? |
|
Answer» To HANDLE NETWORK LATENCY you can USE driver.manage.pageloadingtime for network latency. To handle network latency you can use driver.manage.pageloadingtime for network latency. |
|
| 4. |
How To Start Selenium Rc Server With User Extensions? |
|
Answer» The command used is java -jar selenium-server.jar - EXTENSIONS user-extensions.js Note: In this CASE, the java SCRIPT file user-extensions.js file NAME should always fixed. If the name or extension is changed the selenium RC server will not start. The command used is java -jar selenium-server.jar - Extensions user-extensions.js Note: In this case, the java script file user-extensions.js file name should always fixed. If the name or extension is changed the selenium rc server will not start. |
|
| 5. |
How Selenium Grid Hub Keeps In Touch With Rc Slave Machine? |
|
Answer» At predefined time SELENIUM grid HUB keeps POLLING all RC slaves to make SURE it is available for testing. The deciding parameter is called “remoteControlPollingIntervalSeconds” and is defined in “grid_configuration.yml”file. At predefined time selenium grid hub keeps polling all RC slaves to make sure it is available for testing. The deciding parameter is called “remoteControlPollingIntervalSeconds” and is defined in “grid_configuration.yml”file. |
|
| 6. |
What Are The Limitations Of Selenium Rc? |
|
Answer» The limitations of selenium RC are:
The limitations of selenium RC are: |
|
| 7. |
Other Than The Default Port 4444 How You Can Run Selenium Server? |
|
Answer» You can RUN SELENIUM SERVER on java-jar selenium-server.jar-PORT other than its DEFAULT port. You can run Selenium server on java-jar selenium-server.jar-port other than its default port. |
|
| 8. |
How To Run The Test Cases In Group In Selenium Using Testng? |
|
Answer» Test cases in group in SELENIUM USING TestNG will be executed with the below options. If you want to execute the test cases based on one of the group like REGRESSION test or smoke test @Test(GROUPS = {"regression test", "smoke test"}) Test cases in group in Selenium using TestNG will be executed with the below options. If you want to execute the test cases based on one of the group like regression test or smoke test @Test(groups = {"regression test", "smoke test"}) |
|
| 9. |
Explain How You Can Capture Server Side Log Selenium Server? |
|
Answer» JAVA –JAR .jar –log selenium.log java –jar .jar –log selenium.log |
|
| 10. |
How To Run Test Cases With Dependent In Selenium Using Testng? |
|
Answer» The @TEST should be followed by (dependsOnMethods = "testLogin") Note:- The test CASE will be executed after the testLogin case EX: @Test(dependsOnMethods = "testLogin") The @Test should be followed by (dependsOnMethods = "testLogin") Note:- The test case will be executed after the testLogin case Ex: @Test(dependsOnMethods = "testLogin") |
|
| 11. |
Why To Use Testng With Selenium Rc ? |
|
Answer» If you want full automation against DIFFERENT server and client platforms, You NEED a way to INVOKE the tests from a command line process, REPORTS that tells you what happened and flexibility in how you create your test suites. TESTNG gives that flexibility. If you want full automation against different server and client platforms, You need a way to invoke the tests from a command line process, reports that tells you what happened and flexibility in how you create your test suites. TestNG gives that flexibility. |
|
| 12. |
What Are The Basic Annotations Used To Run Testng Tests In Selenium? |
|
Answer» The basic ANNOTATIONS used to run TestNG tests in Selenium RC: @BeforeClass: The annotated method with @BeforeClass will be run before the FIRST TEST method in the CURRENT class is invoked. @AfterClass: The annotated method with @AfterClass will be run after all the test METHODS in the current class have been run. @BeforeMethod: The annotated method with @BeforeMethod will be run before each test method. @AfterMethod: The annotated method with @AfterMethod will be run after each test method. @Test: Marks a class or a method @Test with as part of the test. The basic annotations used to run TestNG tests in Selenium RC: @BeforeClass: The annotated method with @BeforeClass will be run before the first test method in the current class is invoked. @AfterClass: The annotated method with @AfterClass will be run after all the test methods in the current class have been run. @BeforeMethod: The annotated method with @BeforeMethod will be run before each test method. @AfterMethod: The annotated method with @AfterMethod will be run after each test method. @Test: Marks a class or a method @Test with as part of the test. |
|
| 13. |
Can We Use Selenium Rc To Drive Tests On Two Different Browsers On One Operating System Without Selenium Grid? |
|
Answer» Yes, it is possible when you are not using JAVA TESTING framework. Instead of using Java testing framework if you are using java client driver of selenium then TESTNG allows you to do this. By using “parallel=test” attribute you can SET tests to be executed in parallel and can define TWO DIFFERENT tests, each using different browser. Yes, it is possible when you are not using JAVA testing framework. Instead of using Java testing framework if you are using java client driver of selenium then TestNG allows you to do this. By using “parallel=test” attribute you can set tests to be executed in parallel and can define two different tests, each using different browser. |
|
| 14. |
What Are The Challenges With Selenium Rc Test Suites When Running In Junit? |
|
Answer» The challenges with Selenium RC test suites when running in JUNIT
Note: The dependent test case related issues can be addressed by USING TestNG with junit The challenges with Selenium RC test suites when running in JUnit Note: The dependent test case related issues can be addressed by using TestNG with junit |
|
| 15. |
What Are The Technical Limitations While Using Selenium Rc? |
|
Answer» Apart from “same ORIGIN POLICY” RESTRICTION from JS, Selenium is also restricted from exercising anything that is OUTSIDE browser. Apart from “same origin policy” restriction from js, Selenium is also restricted from exercising anything that is outside browser. |
|
| 16. |
Which Are The Annotations Generated With Junit 4 Tests In Selenium Ide? |
|
Answer» The ANNOTATIONS GENERATED with JUnit 4 tests in Selenium are: @Before public void method(): Will perform the method() before each test. This method can prepare the test @Test public void method(): ANNOTATION @Test IDENTIFIES that this method is a test method.environment, e.g. read input data, initialize the class) @After public void method():Test method must start with test@Before - this annotation is USED for executing a method before. The annotations generated with JUnit 4 tests in Selenium are: @Before public void method(): Will perform the method() before each test. This method can prepare the test @Test public void method(): Annotation @Test identifies that this method is a test method.environment, e.g. read input data, initialize the class) @After public void method():Test method must start with test@Before - this annotation is used for executing a method before. |
|
| 17. |
How Can We Handle Pop-ups In Rc ? |
|
Answer» To handle pop-ups in RC , using selectWindow method, pop-up WINDOW will be selected and window Focus method will let the control from CURRENT window to pop-up windows and perform ACTIONS according to script. To handle pop-ups in RC , using selectWindow method, pop-up window will be selected and window Focus method will let the control from current window to pop-up windows and perform actions according to script. |
|
| 18. |
Why Do You Use Assert And Verify Statements In Selenium Rc Without Referring To Selenium? |
|
Answer» SeleneseTestCase is the class which is having
We use SeleneseTestCase class to extend the selenium test class file. For Ex: the test class is declared as FOLLOWS public class BookFlightSel1 extends SeleneseTestCase In the above example SeleneseTestCase is the BASE class and BookFlightSel1 is the derived class. So, we can DIRECTLY CALL and use the parent class methods verify and assert without INSTANTIATING the class in BookFlightSel1 class. SeleneseTestCase is the class which is having We use SeleneseTestCase class to extend the selenium test class file. For Ex: the test class is declared as follows public class BookFlightSel1 extends SeleneseTestCase In the above example SeleneseTestCase is the base class and BookFlightSel1 is the derived class. So, we can directly call and use the parent class methods verify and assert without instantiating the class in BookFlightSel1 class. |
|
| 19. |
Explain What Is Framework And What Are The Frameworks Available In Rc? |
|
Answer» A COLLECTION of libraries and classes is known as Framework and they are helpful when testers has to AUTOMATE test cases. NUnit, JUnit, TESTNG, BROMINE, RSpec, unittest are some of the frameworks AVAILABLE in RC . A collection of libraries and classes is known as Framework and they are helpful when testers has to automate test cases. NUnit, JUnit, TestNG, Bromine, RSpec, unittest are some of the frameworks available in RC . |
|
| 20. |
What Is The Difference Between Thread.sleep() And Selenium.setspeed()? |
|
Answer» selenium.setSpeed takes a single argument in string format EX: selenium.setSpeed("2000") - will wait for 2 seconds Runs each command in after setSpeed DELAY by the NUMBER of milliseconds mentioned in setSpeed. thread.sleep: takes a single argument in integer format ex: thread.sleep(2000) - will wait for 2 seconds Waits for only once at the command given at sleep. selenium.setSpeed takes a single argument in string format ex: selenium.setSpeed("2000") - will wait for 2 seconds Runs each command in after setSpeed delay by the number of milliseconds mentioned in setSpeed. thread.sleep: takes a single argument in integer format ex: thread.sleep(2000) - will wait for 2 seconds Waits for only once at the command given at sleep. |
|
| 21. |
What Are The Advantages Of Rc? |
|
Answer» Advantages of RC are:
Advantages of RC are: |
|
| 22. |
How To Run Selenium Commands In Slow Motion In Selenium Rc? |
|
Answer» You can run the SELENIUM COMMANDS in RC SLOW motion by TWO WAYS:
You can run the selenium commands in RC slow motion by two ways: |
|
| 23. |
Explain What Is The Main Difference Between Web-driver And Rc ? |
|
Answer» 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. 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. |
|
| 24. |
Which Is The Command Used For Running The Selenium Rc Server? |
|
Answer» The procedure followed to run the Selenium RC Server is: CHANGE the folder PATH to Selenium RC Server Issue the command "java -jar selenium-server.jar" The procedure followed to run the Selenium RC Server is: Open the command prompt. Change the folder path to Selenium RC Server Issue the command "java -jar selenium-server.jar" |
|
| 25. |
Tell Me What Are The Prerequisites To Run Selenium Rc Tests With Junit? |
|
Answer» The prerequisites to RUN Selenium RC tests with Junit: Jre 1.5 or BETTER version NEEDS to be installed /jre/bin folder must be added in environment variable "PATH" Junit folder path must be added to path or build path in eclipse Selenium Java Client drivers needs to be added to the path for execution The prerequisites to run Selenium RC tests with Junit: Jre 1.5 or better version needs to be installed /jre/bin folder must be added in environment variable "path" Junit folder path must be added to path or build path in eclipse Selenium Java Client drivers needs to be added to the path for execution |
|
| 26. |
What Is Selenium Rc (remote Control)? |
|
Answer» 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. 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. |
|