1: What is Selenium Web Driver?
Answer: Selenium Web driver uses accessibility API to drive the browser and recognizes the object in web-based application. It allows writing automated tests replicating the behavior of real user, e.g. Clicking on a link or feeding data in an edit box. Using Selenium Web Driver together with any programming language and other testing framework like TestNG and JUnit, automation test framework to execute tests on different browsers can be created. We can use the robust features of the programming language to interact with other components of application like database interaction, files interaction to create a robust and reliable framework.
2: What are the various browsers supported by Selenium WebDriver?
Answer: WebDriver available for automation in different browsers are ChromeDriver, InternetExplorerDriver, FirefoxDriver, OperaDriver and HtmlUnitDriver.
3: What are the programming languages supported by WebDriver?
Answer: Python, Ruby, C#, Java, Perl, php and javascript are supported.
4: What are the necessary steps required, before I start creating selenium tests on java using eclipse?
Answer: We require following configuration to be set up before creating test in eclipse:
Answer: For Firefox driver, we do not require any additional executable as it is bundled with Java client bindings, For IE driver, Chrome driver, and Opera driver, we require additional executable that can be downloadable from Selenium Official website.
An example of how to create an instance of Internet Explorer Web Driver is shown in below example.
6: Is there any specific pre-condition before executing a selenium script on Internet Explorer?
Answer: Yes, Protected Mode settings should be same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.
7: What are Firefox profile preferences?
Answer: Using Firefox Profile, we can set the preferences for the Firefox in the profile.
The steps to define profile in Selenium are:
1. Create an object of firefox profile
FirefoxProfile profile = new FirefoxProfile();
2. Set the required preference of the firefox :
profile.setPreference(“browser.startup.homepage”,”http://www.google.com”)
3. Create the driver object with profile as defined above.
WebDriver driver = new FirefoxDriver(profile);
8: What is the use of using TestNG with selenium in Java?
Answer: TestNG is a unit testing framework used for java programming language. Test Cases using Selenium Webdriver to identify webelement in the web application can be integrated/created on TestNG framework. Some of the useful features TestNG provides are as follows:
1. Using Annotation to describe order of test cases, defining start conditions and end condition using @after and @before annotations.
Answer: Selenium Web driver uses accessibility API to drive the browser and recognizes the object in web-based application. It allows writing automated tests replicating the behavior of real user, e.g. Clicking on a link or feeding data in an edit box. Using Selenium Web Driver together with any programming language and other testing framework like TestNG and JUnit, automation test framework to execute tests on different browsers can be created. We can use the robust features of the programming language to interact with other components of application like database interaction, files interaction to create a robust and reliable framework.
2: What are the various browsers supported by Selenium WebDriver?
Answer: WebDriver available for automation in different browsers are ChromeDriver, InternetExplorerDriver, FirefoxDriver, OperaDriver and HtmlUnitDriver.
3: What are the programming languages supported by WebDriver?
Answer: Python, Ruby, C#, Java, Perl, php and javascript are supported.
4: What are the necessary steps required, before I start creating selenium tests on java using eclipse?
Answer: We require following configuration to be set up before creating test in eclipse:
- Java needs to be installed in the machine.
- Eclipse IDE needs to be installed.
- Selenium Libraries for WebDriver should be available.
Answer: For Firefox driver, we do not require any additional executable as it is bundled with Java client bindings, For IE driver, Chrome driver, and Opera driver, we require additional executable that can be downloadable from Selenium Official website.
An example of how to create an instance of Internet Explorer Web Driver is shown in below example.
6: Is there any specific pre-condition before executing a selenium script on Internet Explorer?
Answer: Yes, Protected Mode settings should be same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.
7: What are Firefox profile preferences?
Answer: Using Firefox Profile, we can set the preferences for the Firefox in the profile.
The steps to define profile in Selenium are:
1. Create an object of firefox profile
FirefoxProfile profile = new FirefoxProfile();
2. Set the required preference of the firefox :
profile.setPreference(“browser.startup.homepage”,”http://www.google.com”)
3. Create the driver object with profile as defined above.
WebDriver driver = new FirefoxDriver(profile);
8: What is the use of using TestNG with selenium in Java?
Answer: TestNG is a unit testing framework used for java programming language. Test Cases using Selenium Webdriver to identify webelement in the web application can be integrated/created on TestNG framework. Some of the useful features TestNG provides are as follows:
1. Using Annotation to describe order of test cases, defining start conditions and end condition using @after and @before annotations.
No comments:
Post a Comment