├── .gitattributes ├── .gitignore ├── README.md ├── SeleniumCSharp.sln └── SeleniumCSharpTutorials ├── BaseClass └── BaseTest.cs ├── ExtentReports └── SeleniumCSharpTutorial05.html ├── OrderSkipAttribute.cs ├── PageObject ├── ChannelPage.cs ├── ResultPage.cs └── SearchPage.cs ├── ParallelTesting.cs ├── Properties └── AssemblyInfo.cs ├── Screenshots └── Screenshot1.jpeg ├── SeleniumCSharpTutorial04.cs ├── SeleniumCSharpTutorial05.cs ├── SeleniumCSharpTutorials.csproj ├── TestClass.cs ├── TestScripts └── Module1.cs ├── Utilities └── BrowserUtility.cs ├── extent-config.xml ├── license └── packages.config /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SeleniumCSharpByBakkappaN 2 | 3 | Selenium WebDriver C# Csharp tutorials, Page Object Model design pattern & Extent Report Generation 4 | 5 | # Selenium C# Full Course Tutorial - https://youtu.be/utfaE9Nv1FY 6 | 7 | # Selenium C# playlist - https://youtube.com/playlist?list=PLUeDIlio4THF_jhzPDrk2KQq1DxrU1iP8 8 | 9 | # Selenium C# Automation Framework -https://youtu.be/Wrriub4JSzU 10 | -------------------------------------------------------------------------------- /SeleniumCSharp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2005 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeleniumCSharpTutorials", "SeleniumCSharpTutorials\SeleniumCSharpTutorials.csproj", "{8EDF4429-251A-416D-BB68-93F227191BCF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {A07A0393-01AF-4DCB-9340-CCDEEDB89005} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/BaseClass/BaseTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using OpenQA.Selenium; 3 | using OpenQA.Selenium.Chrome; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace SeleniumCSharpTutorials.BaseClass 11 | { 12 | public class BaseTest 13 | { 14 | public IWebDriver driver; 15 | 16 | [SetUp] 17 | public void Open() 18 | { 19 | driver = new ChromeDriver(); 20 | driver.Manage().Window.Maximize(); 21 | driver.Url = "https://www.youtube.com/"; 22 | } 23 | 24 | [TearDown] 25 | public void Close() 26 | { 27 | driver.Quit(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/ExtentReports/SeleniumCSharpTutorial05.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ExtentReports 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | desktop_windows 24 |
25 | 26 | 54 | 55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 89 | 90 | 91 | 92 | 93 | 98 | 99 | 100 | 101 |
102 | 103 | search Search 104 | 105 | 106 |
107 | 108 |
109 | 110 |
111 | 112 |
113 |
114 | 115 | 116 | 117 |
118 |
119 |
120 |
121 |
Tests
122 |
123 | 124 |
125 |
126 | 1 test(s) passed 127 |
128 |
129 | 1 test(s) failed, 0 others 130 |
131 |
132 |
133 | 134 |
135 |
136 |
Steps
137 |
138 | 139 |
140 |
141 | 1 step(s) passed 142 |
143 |
144 | 1 step(s) failed, 5 others 145 |
146 |
147 |
148 | 149 |
150 |
151 |
152 | 153 |
154 |
Tests
155 | 156 |
    157 | 158 | 159 |
  • 160 |
    161 | Test1 162 | 04-09-2018 10:30:10 163 | Pass 164 |
    165 |
    166 |
    167 | 04-09-2018 10:30:10 168 | 04-09-2018 10:30:48 169 | 00:00:38.0571336 170 |
    171 |
    172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 |
    StatusTimestampDetails
    info_outline04-09-2018 10:30:10Test Started
    info_outline04-09-2018 10:30:15Chrome Browser lauched
    info_outline04-09-2018 10:30:47Email id entered
    check_circle04-09-2018 10:30:48Test1 Passed
    203 |
    204 | 205 |
    206 |
  • 207 |
  • 208 |
    209 | Test1 210 | 04-09-2018 10:30:52 211 | Fail 212 |
    213 |
    214 |
    215 | 04-09-2018 10:30:52 216 | 04-09-2018 10:31:27 217 | 00:00:35.2395173 218 |
    219 |
    220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 253 | 254 | 255 |
    StatusTimestampDetails
    info_outline04-09-2018 10:30:52Test Started
    info_outline04-09-2018 10:30:56Chrome Browser lauched
    cancel04-09-2018 10:31:27OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":".//*[@id='abcd']"} 243 | (Session info: chrome=68.0.3440.106) 244 | (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.17134 x86_64) 245 | at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) 246 | at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) 247 | at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value) 248 | at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath) 249 | at OpenQA.Selenium.By.<>c__DisplayClass19_0.b__0(ISearchContext context) 250 | at OpenQA.Selenium.By.FindElement(ISearchContext context) 251 | at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by) 252 | at SeleniumCSharpTutorials.SeleniumCSharpTutorial05.Test2() in L:\TestAutomationFramework\SeleniumC#Sessions\SeleniumCSharp\SeleniumCSharpTutorials\SeleniumCSharpTutorial05.cs:line 77
    256 |
    257 | 258 |
    259 |
  • 260 |
261 |
262 |
263 | 264 | 265 |
266 |
267 |
268 | 269 |
270 | info_outline 271 | check_circle 272 | cancel 273 | cancel 274 | error 275 | warning 276 | redo 277 | clear 278 |
279 |
280 |
281 | 282 | 283 |
284 | 285 | 286 | 287 | 288 | 289 |
290 | 291 |
292 |
293 | 294 |
295 | 296 | search Search 297 | 298 | 299 |
300 | 301 |
302 |
303 | 304 |
305 |
306 | 307 |
308 | 309 |
310 |
Exceptions
311 |
    312 | 313 |
314 |
315 |
316 | 317 |
318 |
319 |
320 |
321 |
322 |
323 | 324 | 325 | 326 | 327 |
328 |
329 |
Dashboard
330 | 331 |
332 |
333 |
334 | Tests
2
335 |
336 |
337 |
338 |
339 | Steps
7
340 |
341 |
342 |
343 |
344 | Start 345 |
04-09-2018 10:30:09
346 |
347 |
348 |
349 |
350 | End 351 |
04-09-2018 10:31:31
352 |
353 |
354 |
355 |
356 | Time Taken 357 |
00:01:21.7114855
358 |
359 |
360 | 361 | 362 |
363 |
364 |
365 | 366 | 367 | 368 | 369 | 370 | 371 |
372 | 373 | 374 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/OrderSkipAttribute.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using OpenQA.Selenium; 8 | using OpenQA.Selenium.Chrome; 9 | using SeleniumCSharpTutorials.BaseClass; 10 | using System.Threading; 11 | using OpenQA.Selenium.Support.UI; 12 | using OpenQA.Selenium.Firefox; 13 | using OpenQA.Selenium.IE; 14 | 15 | namespace SeleniumCSharpTutorials 16 | { 17 | [TestFixture] 18 | public class OrderSkipAttribute 19 | { 20 | 21 | [Test,Order(2),Category("OrderSkipAttribute")] 22 | public void TestMethod1() 23 | { 24 | Assert.Ignore("Defect 12345"); 25 | IWebDriver driver=new ChromeDriver(); 26 | driver.Url = "https://www.facebook.com/"; 27 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 28 | emailTextField.SendKeys("Selenium C#"); 29 | driver.Close(); 30 | } 31 | 32 | [Test, Order(1),Category("OrderSkipAttribute")] 33 | public void TestMethod2() 34 | { 35 | IWebDriver driver = new FirefoxDriver(); 36 | driver.Url = "https://www.facebook.com/"; 37 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 38 | emailTextField.SendKeys("Selenium C#"); 39 | driver.Close(); 40 | } 41 | 42 | [Test, Order(0),Category("OrderSkipAttribute")] 43 | public void TestMethod3() 44 | { 45 | IWebDriver driver = new InternetExplorerDriver(); 46 | driver.Url = "https://www.facebook.com/"; 47 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 48 | emailTextField.SendKeys("Selenium C#"); 49 | driver.Close(); 50 | } 51 | 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/PageObject/ChannelPage.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using OpenQA.Selenium.Support.PageObjects; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace SeleniumCSharpTutorials.PageObject 11 | { 12 | public class ChannelPage 13 | { 14 | IWebDriver driver; 15 | public ChannelPage(IWebDriver driver) 16 | { 17 | this.driver = driver; 18 | PageFactory.InitElements(driver, this); 19 | } 20 | 21 | [FindsBy(How = How.CssSelector, Using = "#channel-title-container>span")] 22 | public IWebElement ChannelName { get; set; } 23 | 24 | public String getChannelName() 25 | { 26 | Thread.Sleep(3000); 27 | return ChannelName.Text; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/PageObject/ResultPage.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using OpenQA.Selenium.Support.PageObjects; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace SeleniumCSharpTutorials.PageObject 11 | { 12 | public class ResultPage 13 | { 14 | IWebDriver driver; 15 | public ResultPage(IWebDriver driver) 16 | { 17 | this.driver = driver; 18 | PageFactory.InitElements(driver, this); 19 | } 20 | 21 | [FindsBy(How = How.LinkText, Using = "Selenium Java TestNG Tutorials - Bakkappa N")] 22 | public IWebElement ChannelNameLinkText { get; set; } 23 | 24 | public ChannelPage NavigateToChannel() 25 | { 26 | Thread.Sleep(3000); 27 | ChannelNameLinkText.Click(); 28 | return new ChannelPage(driver); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/PageObject/SearchPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using OpenQA.Selenium.Support.PageObjects; 7 | using OpenQA.Selenium; 8 | 9 | namespace SeleniumCSharpTutorials.PageObject 10 | { 11 | public class SearchPage 12 | { 13 | IWebDriver driver; 14 | public SearchPage(IWebDriver driver) 15 | { 16 | this.driver = driver; 17 | PageFactory.InitElements(driver,this); 18 | } 19 | 20 | [FindsBy(How=How.Id,Using = "search")] 21 | public IWebElement SearchTextbox { get; set; } 22 | 23 | [FindsBy(How=How.CssSelector,Using = "#search-icon-legacy")] 24 | public IWebElement SearchButton { get; set; } 25 | 26 | public ResultPage NavigateToResultPage() 27 | { 28 | SearchTextbox.SendKeys("selenium c# by bakkappa n"); 29 | SearchButton.Click(); 30 | return new ResultPage(driver); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/ParallelTesting.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using OpenQA.Selenium; 8 | using OpenQA.Selenium.Chrome; 9 | using SeleniumCSharpTutorials.BaseClass; 10 | using System.Threading; 11 | using OpenQA.Selenium.Support.UI; 12 | using SeleniumCSharpTutorials.Utilities; 13 | 14 | namespace SeleniumCSharpTutorials 15 | { 16 | [TestFixture] 17 | public class ParallelTesting 18 | { 19 | IWebDriver driver; 20 | 21 | [Test,Category("UAT Testing"),Category("Module1")] 22 | public void TestMethod1() 23 | { 24 | var Driver=new BrowserUtility().Init(driver); 25 | IWebElement emailTextField= Driver.FindElement(By.XPath(".//*[@id='email']")); 26 | emailTextField.SendKeys("Selenium C#"); 27 | Driver.Close(); 28 | } 29 | 30 | [Test, Category("UAT Testing"), Category("Module1")] 31 | public void TestMethod2() 32 | { 33 | var Driver = new BrowserUtility().Init(driver); 34 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 35 | emailTextField.SendKeys("Selenium C#"); 36 | Driver.Close(); 37 | } 38 | 39 | [Test, Category("UAT Testing"), Category("Module1")] 40 | public void TestMethod3() 41 | { 42 | var Driver = new BrowserUtility().Init(driver); 43 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 44 | emailTextField.SendKeys("Selenium C#"); 45 | Driver.Close(); 46 | } 47 | 48 | [Test, Category("UAT Testing"), Category("Module1")] 49 | public void TestMethod4() 50 | { 51 | var Driver = new BrowserUtility().Init(driver); 52 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 53 | emailTextField.SendKeys("Selenium C#"); 54 | Driver.Close(); 55 | } 56 | 57 | [Test, Category("UAT Testing"), Category("Module1")] 58 | public void TestMethod5() 59 | { 60 | var Driver = new BrowserUtility().Init(driver); 61 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 62 | emailTextField.SendKeys("Selenium C#"); 63 | Driver.Close(); 64 | } 65 | 66 | [Test, Category("UAT Testing"), Category("Module1")] 67 | public void TestMethod6() 68 | { 69 | var Driver = new BrowserUtility().Init(driver); 70 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 71 | emailTextField.SendKeys("Selenium C#"); 72 | Driver.Close(); 73 | } 74 | 75 | [Test, Category("UAT Testing"), Category("Module1")] 76 | public void TestMethod7() 77 | { 78 | var Driver = new BrowserUtility().Init(driver); 79 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 80 | emailTextField.SendKeys("Selenium C#"); 81 | Driver.Close(); 82 | } 83 | 84 | [Test, Category("UAT Testing"), Category("Module1")] 85 | public void TestMethod8() 86 | { 87 | var Driver = new BrowserUtility().Init(driver); 88 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 89 | emailTextField.SendKeys("Selenium C#"); 90 | Driver.Close(); 91 | } 92 | 93 | [Test, Category("UAT Testing"), Category("Module1")] 94 | public void TestMethod9() 95 | { 96 | var Driver = new BrowserUtility().Init(driver); 97 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 98 | emailTextField.SendKeys("Selenium C#"); 99 | Driver.Close(); 100 | } 101 | 102 | [Test, Category("UAT Testing"), Category("Module1")] 103 | public void TestMethod10() 104 | { 105 | var Driver = new BrowserUtility().Init(driver); 106 | IWebElement emailTextField = Driver.FindElement(By.XPath(".//*[@id='email']")); 107 | emailTextField.SendKeys("Selenium C#"); 108 | Driver.Close(); 109 | } 110 | 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using NUnit.Framework; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("SeleniumCSharpTutorials")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("nunit.tests")] 14 | [assembly: AssemblyCopyright("Copyright © 2017")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, set the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // Version information for an assembly consists of the following four values: 24 | // 25 | // Major Version 26 | // Minor Version 27 | // Build Number 28 | // Revision 29 | // 30 | // You can specify all the values or you can default the Build and Revision Numbers 31 | // by using the '*' as shown below: 32 | // [assembly: AssemblyVersion("1.0.*")] 33 | [assembly: AssemblyVersion("1.0.0.0")] 34 | [assembly: AssemblyFileVersion("1.0.0.0")] 35 | 36 | //To define [Test] attributes 37 | //[assembly: Parallelizable(ParallelScope.Children)] 38 | 39 | //Number of browsers 40 | //[assembly: LevelOfParallelism(1)] 41 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/Screenshots/Screenshot1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BakkappaN/SeleniumCSharpByBakkappaN/43e3895d71fb9f165871050b403eca01c2a1ac59/SeleniumCSharpTutorials/Screenshots/Screenshot1.jpeg -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/SeleniumCSharpTutorial04.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NUnit.Framework; 7 | using OpenQA.Selenium.Chrome; 8 | using OpenQA.Selenium; 9 | using System.Collections; 10 | 11 | namespace SeleniumCSharpTutorials 12 | { 13 | [TestFixture] 14 | public class SeleniumCSharpTutorial04 15 | { 16 | [Test] 17 | [Author("Bakkappa","bakkappac@gmail.com")] 18 | [Description("Facebook login Verify")] 19 | [TestCaseSource("DataDrivenTesting")] 20 | public void Test1(String urlName) 21 | { 22 | IWebDriver driver = null; 23 | try 24 | { 25 | driver = new ChromeDriver(); 26 | driver.Manage().Window.Maximize(); 27 | // driver.Url = "https://www.facebook.com/"; 28 | driver.Url = urlName; 29 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 30 | // IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='abcd']")); 31 | emailTextField.SendKeys("Selenium C#"); 32 | driver.Quit(); 33 | } 34 | catch (Exception e) 35 | { 36 | ITakesScreenshot ts = driver as ITakesScreenshot; 37 | Screenshot screenshot = ts.GetScreenshot(); 38 | screenshot.SaveAsFile("L:\\TestAutomationFramework\\SeleniumC#Sessions\\SeleniumCSharp\\SeleniumCSharpTutorials\\Screenshots\\Screenshot1.jpeg", ScreenshotImageFormat.Jpeg); 39 | Console.WriteLine(e.StackTrace); 40 | throw; 41 | } 42 | finally 43 | { 44 | if(driver!=null) 45 | { 46 | driver.Quit(); 47 | } 48 | 49 | } 50 | 51 | } 52 | 53 | static IList DataDrivenTesting() 54 | { 55 | ArrayList list = new ArrayList(); 56 | list.Add("https://www.facebook.com/"); 57 | //list.Add("https://www.youtube.com/"); 58 | //list.Add("https://www.gmail.com/"); 59 | return list; 60 | } 61 | 62 | //[Test] 63 | //[Author("Bakkappa", "bakkappac@gmail.com")] 64 | //[Description("Facebook login Verify")] 65 | //public void Test2() 66 | //{ 67 | // IWebDriver driver = new ChromeDriver(); 68 | // driver.Manage().Window.Maximize(); 69 | // driver.Url = "https://www.facebook.com/"; 70 | // IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 71 | // emailTextField.SendKeys("Selenium C#"); 72 | // driver.Quit(); 73 | //} 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/SeleniumCSharpTutorial05.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using OpenQA.Selenium; 3 | using OpenQA.Selenium.Chrome; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using AventStack.ExtentReports; 10 | using AventStack.ExtentReports.Reporter; 11 | 12 | namespace SeleniumCSharpTutorials 13 | { 14 | [TestFixture] 15 | public class SeleniumCSharpTutorial05 16 | { 17 | ExtentReports extent = null; 18 | 19 | [OneTimeSetUp] 20 | public void ExtentStart() 21 | { 22 | extent = new ExtentReports(); 23 | var htmlReporter = new ExtentHtmlReporter(@"L:\TestAutomationFramework\SeleniumC#Sessions\SeleniumCSharp\SeleniumCSharpTutorials\ExtentReports\SeleniumCSharpTutorial05.html"); 24 | extent.AttachReporter(htmlReporter); 25 | } 26 | 27 | [OneTimeTearDown] 28 | public void ExtentClose() 29 | { 30 | extent.Flush(); 31 | } 32 | 33 | [Test] 34 | public void Test1() 35 | { 36 | IWebDriver driver = null; 37 | ExtentTest test = null; 38 | try 39 | { 40 | test=extent.CreateTest("Test1").Info("Test Started"); 41 | driver = new ChromeDriver(); 42 | driver.Manage().Window.Maximize(); 43 | test.Log(Status.Info,"Chrome Browser lauched"); 44 | driver.Url = "https://www.facebook.com/"; 45 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 46 | emailTextField.SendKeys("Selenium C#"); 47 | test.Log(Status.Info, "Email id entered"); 48 | driver.Quit(); 49 | test.Log(Status.Pass, "Test1 Passed"); 50 | } 51 | catch (Exception e) 52 | { 53 | 54 | throw; 55 | } 56 | finally 57 | { 58 | if (driver != null) 59 | { 60 | driver.Quit(); 61 | } 62 | } 63 | } 64 | 65 | [Test] 66 | public void Test2() 67 | { 68 | IWebDriver driver = null; 69 | ExtentTest test = null; 70 | try 71 | { 72 | test = extent.CreateTest("Test2").Info("Test Started"); 73 | driver = new ChromeDriver(); 74 | driver.Manage().Window.Maximize(); 75 | test.Log(Status.Info, "Chrome Browser lauched"); 76 | driver.Url = "https://www.facebook.com/"; 77 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='abcd']")); 78 | emailTextField.SendKeys("Selenium C#"); 79 | test.Log(Status.Info, "Email id entered"); 80 | driver.Quit(); 81 | test.Log(Status.Pass, "Test1 Passed"); 82 | } 83 | catch (Exception e) 84 | { 85 | test.Log(Status.Fail, e.ToString()); 86 | throw; 87 | } 88 | finally 89 | { 90 | if (driver != null) 91 | { 92 | driver.Quit(); 93 | } 94 | } 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/SeleniumCSharpTutorials.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Debug 8 | AnyCPU 9 | {8EDF4429-251A-416D-BB68-93F227191BCF} 10 | Library 11 | Properties 12 | SeleniumCSharpTutorials 13 | SeleniumCSharpTutorials 14 | v4.8 15 | 512 16 | 17 | 18 | 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | ..\packages\ExtentReports.3.1.2\lib\ExtentReports.dll 40 | 41 | 42 | ..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll 43 | 44 | 45 | ..\packages\MongoDB.Bson.2.4.0\lib\net45\MongoDB.Bson.dll 46 | 47 | 48 | ..\packages\MongoDB.Driver.2.4.0\lib\net45\MongoDB.Driver.dll 49 | 50 | 51 | ..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll 52 | 53 | 54 | ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll 55 | 56 | 57 | ..\packages\NUnit.3.10.0\lib\net45\nunit.framework.dll 58 | 59 | 60 | ..\packages\RazorEngine.3.9.0\lib\net45\RazorEngine.dll 61 | 62 | 63 | 64 | 65 | ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll 66 | True 67 | 68 | 69 | ..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll 70 | 71 | 72 | ..\packages\Selenium.WebDriver.3.11.0\lib\net45\WebDriver.dll 73 | 74 | 75 | ..\packages\Selenium.Support.3.11.0\lib\net45\WebDriver.Support.dll 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 127 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/TestClass.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using OpenQA.Selenium; 8 | using OpenQA.Selenium.Chrome; 9 | using SeleniumCSharpTutorials.BaseClass; 10 | using System.Threading; 11 | using OpenQA.Selenium.Support.UI; 12 | 13 | namespace SeleniumCSharpTutorials 14 | { 15 | [TestFixture] 16 | public class TestClass : BaseTest 17 | { 18 | [Test,Category("Smoke Testing")] 19 | public void TestMethod1() 20 | { 21 | IWebElement emailTextField=driver.FindElement(By.XPath(".//*[@id='email']")); 22 | emailTextField.SendKeys("Selenium C#"); 23 | IWebElement monthDropdownList=driver.FindElement(By.XPath(".//*[@id='month']")); 24 | SelectElement element = new SelectElement(monthDropdownList); 25 | element.SelectByIndex(1);//Select by index 26 | element.SelectByText("Mar");//Select by text 27 | element.SelectByValue("6");//Select by value 28 | } 29 | 30 | [Test,Category("Regression Testing")] 31 | public void TestMethod2() 32 | { 33 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 34 | emailTextField.SendKeys("Selenium C#"); 35 | } 36 | 37 | [Test, Category("Smoke Testing")] 38 | public void TestMethod3() 39 | { 40 | IWebElement emailTextField = driver.FindElement(By.XPath(".//*[@id='email']")); 41 | emailTextField.SendKeys("Selenium C#"); 42 | Thread.Sleep(5000); 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/TestScripts/Module1.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using SeleniumCSharpTutorials.BaseClass; 3 | using SeleniumCSharpTutorials.PageObject; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading; 9 | using System.Threading.Tasks; 10 | 11 | namespace SeleniumCSharpTutorials.TestScripts 12 | { 13 | [TestFixture] 14 | public class Module1 : BaseTest 15 | { 16 | [Test] 17 | public void TestMethod1() 18 | { 19 | var searchpage=new SearchPage(driver); 20 | var resultpage=searchpage.NavigateToResultPage(); 21 | var channelpage=resultpage.NavigateToChannel(); 22 | String actualChannelName=channelpage.getChannelName(); 23 | String expectedChannelName = "Selenium Java Tutorials - Bakkappa N"; 24 | Assert.IsTrue(actualChannelName.Equals(expectedChannelName)); 25 | Thread.Sleep(5000); 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/Utilities/BrowserUtility.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using OpenQA.Selenium.Chrome; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace SeleniumCSharpTutorials.Utilities 10 | { 11 | public class BrowserUtility 12 | { 13 | public IWebDriver Init(IWebDriver driver) 14 | { 15 | driver=new ChromeDriver(); 16 | driver.Manage().Window.Maximize(); 17 | driver.Url = "https://www.facebook.com/"; 18 | return driver; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/extent-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | standard 7 | 8 | 9 | 10 | UTF-8 11 | 12 | 13 | 14 | https 15 | 16 | 17 | Extent 18 | 19 | true 20 | 21 | 22 | Automation Report 23 | 24 | 25 | 26 | bottom 27 | 28 | 29 | 30 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/license: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BakkappaN/SeleniumCSharpByBakkappaN/43e3895d71fb9f165871050b403eca01c2a1ac59/SeleniumCSharpTutorials/license -------------------------------------------------------------------------------- /SeleniumCSharpTutorials/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | --------------------------------------------------------------------------------