8. Run the Created Selenium WebDriver Test
Prerequisites:
1. Create Selenium WebDriver Test as specified in Post# 6 Create a JUnit Selenium WebDriver Test using Selenium IDE
2. Ensure a Compatible Firefox Browser is Installed on your machine as explained in Post#7 Ensure Compatible Firefox Browser is installed
1. Run the Selenium WebDriver Test
1. In Eclipse IDE, right click on the 'ImFeelingLucky' class and select 'Run As' -> 'JUnit Test' as shown below:
2. See how our automation test runs on Firefox Browser from the below video:
Click here to watch the video
2. Check the Results after the test run is finished
1. After the test run is finished as shown in the above video, we've to find out whether the automation test run by Selenium WebDriver is passed or failed
2. In order to do that, view the Eclipse IDE after the test run and view the test results as shown below:
3. Red color bar will be displayed instead of Green color bar if the test gets failed.
Thats it !! This is how we run the Selenium WebDriver tests in Eclipse IDE.
Please comment below to feedback or ask questions.
Introduction to JUnit will be explained in the next post.
Followers
Labels
- aaaa. 1. Introduction to Selenium WebDriver
- aaab. 2. Downloading the Selenium WebDriver
- aaac. 3. Configuring Projects in Eclipse IDE to work with Selenium WebDriver
- aaad. 4. Is Selenium Server required by Selenium WebDriver ?
- aaae. 5. Selenium RC versus Selenium Web Driver
- aaaf. 6. Create a JUnit Selenium WebDriver Test using Selenium IDE
- aaag. 7. Ensure compatible Firefox Browser is installed
- aaah. 8. Run the Created Selenium WebDriver Test
- aaai. 9. Introduction to JUnit
- aaai. 9. Using JUnit annotation in our Selenium WebDriver Tests
- aaaj. 10. Eclipse Automatically adds the Package Name into the newly created Java Class
- aaak. 11. Writing Selenium WebDriver Test on our own
- aaal. 12. Implementing JUnit Annotations
- aaam. 13. WebDriver Class and its Predefined Methods
- aaan. 14. 'get( )' - Selenium WebDriver method to open the specified URL page
- aaao. 15. manage( ).window( ).maximize( ) - to maximize the Browser window
- aaap. 16. manage( ).window( ).setSize( ) - to resize the Browser window
- aaaq. 17. Using Thread.sleep(Millie Seconds) to pause the execution
- aaar. 18. quit( ) - Selenium WebDriver method for closing the Test Browser window
- aaas. 19. What are Locators ?
- aaat. 20. Different Types of Locators to identify UI elements
- aaau. 21. Tools in Selenium to find out the locators
- aaav. 22. Locate UI elements by ID
- aaaw. 23. Locate UI elements by Name
- aaax. 24. Locate UI elements by Link
- aaay. 25. Locate UI elements by XPath
- aaaz. 26. Locate UI elements by CSS
- aaba. 27. Finding locators for UI elements using the Selenium IDEs recording feature
- aabb. 28. click( ) - predefined method for clicking a Link
- aabc. 29. click( ) - predefined method for clicking a Button
- aabd. 30. Using sendKeys( ) predefined method for entering text
- aabe. 31. Using click( ) - predefined method to select a radio button
- aabf. 32. Using click( ) predefined method for selecting a check box option
- aabg. 33. Using sendKeys( ) predefined method to select a list item from the drop down list
- aabh. 34. Using getText( ) to retrieve any elements Text
- aabi. 35. Using getPageSource( ) method
- aabj. 36. Using getTitle( ) method for retrieving the Title of the page
- aabk. 37. Using getAttribute("value") method for retrieving text from the text fields
- aabl. 38. Using isDisplayed( ) to verify whether an element is available
- aabm. 39. Using FirefoxDriver for running Selenium WebDriver Automation Tests on Firefox Browser
- aabn. 40. Using ChromeDriver for Running our Tests on Chrome Browser
- aabo. 41. Using InternetExplorerDriver for Running our Tests on Internet Explorer Browser
- aabp. 42. View the source code generated by Selenium IDE in Selenium WebDriver format
- aabp. 43. Renaming the Projects and its items using Eclipse IDE 'Refactor' option
- aabr. 44. Refactoring the Selenium Automation Code
- aabs. 45. Identifying few sample real time tests for implementing the Refactoring concept
- aabt. 46. Non-Refactored Selenium Automation code for the tests identified in previous post
- aabu. 47. Only one test should be written inside a single test method
- aabv. 48. Using @BeforeClass and @AfterClass JUnit Annotations
- aabw. 49. Refactoring the Selenium Automation code to make it readable
- aabx. 50. Upgrading Selenium WebDriver
- aaby. 51. HTML BASICS
- aabz. 52. Introduction to XPath
- aaca. 53. Understanding the hierarchy of HTML Source
- aacb. 54. Parse the HTML Source using its hierarchy and find XPath path
- aacc. 55. Different types of Nodes in HTML
- aacd. 56. Locate the Element Nodes using Relative XPath
- aace. 57. XPath Functions
- aacf. 58. last( ) - XPath Function
- aacg. 59. position( ) - XPath function
- aach. 60. contains( ) - XPath function
- aaci. 61. starts-with( ) XPath Function
- aacj. 62. Other XPath Functions
- aack. 63. XPath Operators
- aacl. 64. Wild Cards usage in XPath
- aacm. 65. Using node( ) wild card in XPath Statements
- aacn. 66. Using * wild card in XPath Statements
- aaco. 67. Using | to combine XPath Statements
- aacp. 68. XPath Optimization
- aacq. 69. XPath Optimization Strategy One - Use the id attribute if available for the element but not used in XPath Statement
- aacr. 70. XPath Optimization Strategy Two - Use the combination of attributes to make the XPath more specific
- aacs. 71. XPath Optimization Strategy Three - If there is really nothing to distinguish find the first unique element from its siblings and add the index value to it
- aact. 72. XPath Optimization Strategy Four - Use Relative XPath Statements instead of Absolute XPath Statements
- aacu. 73. Practice XPath
- aacv. 74. Easy and Regular way of finding XPath Statements for Elements
- aacw. 75. Typing the Text into Text box by Locating the Text Box field with XPath Statement
- aacx. 76. Using isSelected( ) predefined method to get the status of the radio buttons and check box options
- aacy. 77. Selecting values from the Drop down list by locating the Drop down field using XPath Statement
- aacz. 78. Clicking the Link by locating it using XPath Statement
- aada. 79. Clicking the Button by locating it using XPath statement
- aadb. 80. Introduction to CSS selectors
- aadc. 81. html CSS Selector for locating the whole web page
- aadd. 82. body CSS Selector for locating the body of the web page
- aade. 83. Absolute CSS Selector path
- aadf. 84. Relative CSS Selector path
- aadg. 85. Using # to select an element with a specified id
- aadh. 86. Using [attribute='value'] to select an element containing the specified attribute
- aadi. 87. Using dot in CSS path to select an element with a specified class
- aadj. 88. Using [attribute] to select all the element containing the specified attribute
- aadk. 89. Locating first child last child and nth child with CSS path
- aadl. 90. Locating different elements using a single CSS path
- aadm. 91. Using * wild card in CSS selector
- aadn. 92. Using ^= $= and *= in CSS selector
- aado. 93. Using Boolean Operators in CSS selector
- aadp. 94. CSS selector Optimization
- aadq. 95. CSS selector Optimization Strategy One - Use the id attribute if available for the element but not used
- aadr. 96. CSS selector Optimization Strategy Two - Use the combination of attributes to make the CSS selector statement more specific
- aads. 97. CSS selector Optimization Strategy Three - Use Relative CSS Statements instead of Absolute CSS Statements
- aadt. 98. Practice CSS Path
- aadu. 99. Easy and Regular way of finding CSS Path for Elements
- aadv. 100. Typing the Text into Text box by Locating the Text Box field using CSS Path Statement
- aadw. 101. Using isSelected( ) predefined method to get the status of the radio buttons and check box options
- aadx. 102. Selecting values from the Drop down list by locating the Drop down field using CSS Path Statement
- aady. 103. Clicking a link by locating it using CSS Path statement
- aadz. 104. Clicking the Button by locating it using CSS Path statement
- aaea. 105. Using sendKeys( ) command for entering text into a text box field
- aaeb. 106. Using sendKeys( ) command for entering text into a text box field
- aaec. 107. Using sendKeys( ) command for entering single line text into a Text Area field
- aaed. 108. Using sendKeys( ) command for entering multiple lines of text into a Text Area field
- aaee. 109. Using clear( ) command to clear a text box field
- aaef. 110. Using clear( ) command to clear a Text Area field
- aaeg. 111. Difference between close( ) and quit( ) Selenium WebDriver commands
- aaeh. 112. Launching more than one Browser windows
- aaei. 113. Understanding how close( ) and quit( ) commands work when more than one window is opened
- aaej. 114. Understanding how close( ) and quit( ) commands work when only one window is opened
- aaek. 115. Try this if close( ) WebDriver command is not closing the Browser window
- aael. 116. Using click( ) WebDriver command for selecting a check box option
- aaem. 117. Using click( ) command for deselecting a check box option
- aaen. 118. Using isSelected( ) method to get the status of the check box option
- aaeo. 119. Using click( ) command to select a radio button
- aaep. 120. Using isSelected( ) method to get the status of the radio button
- aaeq. 121. Using isEnabled( ) to find out whether the button is enabled
- aaer. 122. Using isEnabled( ) to find out whether the text box field is in enabled state or disabled state
- aaes. 123. Using sendKeys( ) command to select a list item from the drop down field
- aaet. 124. Using deselectAll( ) command to deselect any already selected list options in the multiple-selection Box
- aaeu. 125. Using selectByVisibleText( ) command to select more than one list options from the Multi Select Box field
- aaev. 126. Using deselectByVisibleText( ) command to deselect any list option from the Multi Select Box field
- aaew. 127. Using selectByIndex( ) command to select any list option using its Index value from the Multi Select Box field
- aaex. 128. Using deselectByIndex( ) command to deselect any list option using its Index value from the Multi Select Box field
- aaey. 129. Using selectByValue( ) command to select the list option from the Multi Select Box field using the specified value
- aaez. 130. Using deselectByValue( ) command to deselect the list option from the Multi Select Box field using its value
- aafa. 131. Using selectByVisibleText( ) command with Drop Down Field
- aafb. 132. Using selectByIndex( ) command with Drop Down field
- aafc. 133. Using selectByValue( ) command with Drop Down field
- aafd. 134. Using navigate( ).to( ) command to open the specified URL
- aafe. 135. Using navigate( ).back( ) command to move backward in our browser
- aaff. 136. Using navigate( ).forward( ) command to move forward in our browser
- aafg. 137. Using sendKeys( ) command to browser a file
- aafh. 138. Using click( ) for clicking a button
- aafi. 139. Using click( ) for clicking a link
- aafj. 140. Using getAttribute("value") with a text box field
- aafk. 141. Using getAttribute("value") method with Password field
- aafl. 142. Using getAttribute("value") method with Text Area field
- aafm. 143. Using getAttribute("value") method with drop down field
- aafn. 144. Using getFirstSelectedOption( ) with drop down field to retrieve the label text of the list option that is currently selected
- aafo. 145. Using getFirstSelectedOption( ) with Multi-Selection Box field to retrieve the label text of the option that is selected first in the field
- aafp. 146. Using isMultiple( ) with a drop down field
- aafq. 147. Using isMultiple( ) with Multi-Selection Box field
- aafr. 148. Using getAllSelectedOptions( ) to get all the selected options in Multi-Selection Box field
- aafs. 149. Using getOptions( ) to get all the options available in Drop Down field
- aaft. 150. Using getOptions( ) to get all the options available in Multi-Selection Box field
- aafu. 151. Entering an integer variables value into a text box field using sendKeys( ) command
- aafv. 152. Using size( ) to retrieve the count of list options available in the drop down field
- aafw. 153. Using size( ) to retrieve the count of list options available in the Multi-Selection Box field
- aafx. 154. Locating elements using By.tagName( )
- aafy. 155. Using findElements( )
- aafz. 156. Using getTitle( ) to retrieve the title of the page
- aaga. 157. Using getText( ) to retrieve the elements text
- aagb. 158. Get XPath Count in Selenium WebDriver
- aagc. 159. Introduction to TestNG
- aagd. 160. Installing TestNG in Eclipse IDE
- aage. 161. Using TestNG Annotations in Selenium WebDriver code
- aagf. 162. Non-Refactored Selenium Automation Code using TestNG framework
- aagg. 163. Only one test should be written inside a single test method
- aagh. 164. Using @BeforeClass and @AfterClass TestNG Annotations