Podcast
Questions and Answers
Where are the results of the build and run operations displayed?
Where are the results of the build and run operations displayed?
- In a separate console window
- In the Firefox browser
- At the bottom of the Eclipse window (correct)
- At the top of the Eclipse window
What happens when you launch a test?
What happens when you launch a test?
- A new instance of the Eclipse window opens
- The test is executed in the background
- An actual instance of the Firefox browser is launched and loads the page (correct)
- A warning message is displayed
What is the purpose of the messages at the bottom of the Eclipse window?
What is the purpose of the messages at the bottom of the Eclipse window?
- To display the test results
- To report the state of the driver needed to launch the browser (correct)
- To report errors
- To terminate the test
What is missing in the initial test created?
What is missing in the initial test created?
What is the purpose of Selenium Web Driver?
What is the purpose of Selenium Web Driver?
How do you add JUnit to your project in Eclipse?
How do you add JUnit to your project in Eclipse?
Why is error handling needed in a real test script?
Why is error handling needed in a real test script?
What is the function of JUnit in test result evaluation?
What is the function of JUnit in test result evaluation?
What happens when an error occurs during a JUnit test?
What happens when an error occurs during a JUnit test?
What is the purpose of Selenium WebDriver?
What is the purpose of Selenium WebDriver?
What is the relationship between JUnit and Selenium?
What is the relationship between JUnit and Selenium?
What is the significance of the assertions in JUnit testing?
What is the significance of the assertions in JUnit testing?
What is the benefit of using a separate JUnit test case?
What is the benefit of using a separate JUnit test case?
What is the purpose of the references provided?
What is the purpose of the references provided?
What is a significant difference between Selenium Web Driver and Selenium Remote Control?
What is a significant difference between Selenium Web Driver and Selenium Remote Control?
What is a limitation of Selenium Remote Control?
What is a limitation of Selenium Remote Control?
What can Selenium Web Driver test that Selenium Remote Control cannot?
What can Selenium Web Driver test that Selenium Remote Control cannot?
What programming languages can be used with Selenium Web Driver?
What programming languages can be used with Selenium Web Driver?
What is a benefit of using Selenium Web Driver over Selenium Remote Control?
What is a benefit of using Selenium Web Driver over Selenium Remote Control?
What type of development work can be done with Selenium Web Driver?
What type of development work can be done with Selenium Web Driver?
What is one of the primary functions of Maven?
What is one of the primary functions of Maven?
What is a requirement for Maven dependency management to work effectively?
What is a requirement for Maven dependency management to work effectively?
What is a characteristic of Selenium Web Driver libraries?
What is a characteristic of Selenium Web Driver libraries?
What may be necessary to install in addition to Web Driver libraries?
What may be necessary to install in addition to Web Driver libraries?
What should be downloaded and installed first when setting up a development environment?
What should be downloaded and installed first when setting up a development environment?
Why is it important to ensure the correct version of a tool is installed?
Why is it important to ensure the correct version of a tool is installed?
What is a common requirement for programming language tools?
What is a common requirement for programming language tools?
What is a common scenario where platform independence is beneficial?
What is a common scenario where platform independence is beneficial?
Where should you copy the jar files from the selenium-java-4.21.0 folders?
Where should you copy the jar files from the selenium-java-4.21.0 folders?
What do you need to do after copying the jar files into the project's jar folder?
What do you need to do after copying the jar files into the project's jar folder?
What do you need to select in the Build Path configuration?
What do you need to select in the Build Path configuration?
What is the next step after setting up the project?
What is the next step after setting up the project?
What is the purpose of the first test in the example?
What is the purpose of the first test in the example?
What is instantiated on line 3 of the example code?
What is instantiated on line 3 of the example code?
What is used to launch a browser and load the page on line 7?
What is used to launch a browser and load the page on line 7?
What is the purpose of line 5 of the example code?
What is the purpose of line 5 of the example code?
Flashcards are hidden until you start studying
Study Notes
Running a Test
- To run a test, select the file from the drop-down option of the run button and click to execute.
- The results of the build and run operations are displayed at the bottom of the Eclipse window.
Launching a Test
- Launching a test opens an actual instance of the Firefox browser and loads the page into it.
- Messages at the bottom of the screenshot are in the Eclipse message area and may appear as errors, but they report the state of the driver needed to launch the browser.
Extending a Web Driver Test
- A test can be extended to fill in form fields and submit the form.
- Error handling is necessary to catch and report exceptions properly, as the findElement() method throws exceptions when it cannot find the specified element.
Checking Test Results
- Selenium Web Driver is good at running test cases, but it does not include the functionality to evaluate the results of a test.
- Test result evaluation must be done using other tools such as JUnit and TestNG.
Adding JUnit to a Project
- JUnit can be added to a project at the same time as the Web Driver jar files.
- To add JUnit, right-click on the project name in the left pane of Eclipse, select 'Properties', then select 'Java Build Path' and add the JUnit library to the classpath.
Integrating JUnit with Selenium
- JUnit can be used to evaluate the results of a test.
- The assertEquals() method terminates normally when a test runs successfully, but throws an exception when an error occurs.
Creating a Separate JUnit Test Case
- A separate JUnit test case can be created to evaluate the results of a test.
Selenium Web Driver Overview
- Selenium Web Driver is a replacement for the older Selenium Remote Control automation engine.
- Web Driver does not use JavaScript, instead, it uses languages like Java, C#, and Ruby.
- Web Driver can test more web activities such as file upload, file download, and other system access operations.
Installing Selenium Web Driver
- Web Driver consists of programming language-specific libraries, making it relatively platform-independent.
- All Web Driver libraries include support for the Firefox browser, but it may be necessary to install a driver utility.
- Support for many other types of browsers must be downloaded and added to the development environment separately.
Components of Selenium WebDriver
- Selenium Web Driver has several components, including programming language-specific libraries and driver utilities.
Installing Web Driver
- In addition to the Web Driver libraries, the following programs and utilities may be needed:
- Software development IDE
- Programming language tools (JDK, Python interpreter, etc.)
- Testing libraries (Junit, TestNg, etc.)
- Other application-specific libraries
- Build/run utilities (Maven, Jenkins, etc.)
- Runtime drivers (geckodriver, etc.)
Setting up a Web Driver Test
- Add the jar files to the project's build path.
- Create a package and a new Java class in the project.
- Start adding test code to the class.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.