Selenium Interview Question-8

87) How do you identify an object using selenium?
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
88) In Selenium what are Breakpoints and Startpoints?
·         Breakpoints: When you implement a breakpoint in your code, the execution will stop right there. This helps you to verify that your code is working as expected.
·         StartpointsStartpoint indicates the point from where the execution should begin. Startpoint can be used when you want to run the testscript from the middle of the code or a breakpoint.
89) Mention why to choose Python over Java in Selenium?
Few points that favor Python over Java to use with Selenium is,
·         Java programs tend to run slower compared to Python programs.
·         Java uses traditional braces to start and ends blocks, while Python uses indentation.
·         Java employs static typing, while Python is dynamically typed.
·         Python is simpler and more compact compared to Java.
90) Mention what are the challenges in Handling Ajax Call in Selenium Webdriver?
The challenges faced in Handling Ajax Call in Selenium Webdriver are
·         Using "pause" command for handling Ajax call is not completely reliable. Long pause time makes the test unacceptably slow and increases the testing time. Instead, "waitforcondition" will be more helpful in testing Ajax applications.
·         It is difficult to assess the risk associated with particular Ajax applications
·         Given full freedom to developers to modify Ajax application makes the testing process challenging
·         Creating automated test request may be difficult for testing tools as such AJAX application often use different encoding or serialization technique to submit POST data.
91) Mention what is IntelliJ?
Intellij is an IDE that helps you to write better and faster code for Selenium. Intellij can be used in the option to Java bean and Eclipse.
92) Mention in what ways you can customize TestNG report?
You can customize TestNG report in two ways,
·         Using ITestListener Interface
·         Using IReporter Interface
93) To generate pdf reports mention what Java API is required?
To generate pdf reports, you need Java API IText.
94) Mention what is Listeners in Selenium WebDriver?

In Selenium WebDriver, Listeners "listen" to the event defined in the selenium script and behave accordingly. It allows customizing TestNG reports or logs. There are two main listeners i.e. WebDriver Listeners and TestNG Listeners.

Comments

Popular posts from this blog

Handling Dynamic Web Tables Using Selenium WebDriver

Verify Specific Position of an Element

Read it out for TESTNG before going for an iterview