diff --git a/.gitattributes b/.gitattributes index 194cad0274f9920ea3bbed163f145b66ed7d44e1..1d434ad4732250438cb6de336cd1aafda1293fdb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -57,3 +57,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text 05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/001[[:space:]]Introduction[[:space:]]to[[:space:]]Test[[:space:]]Case.mp4 filter=lfs diff=lfs merge=lfs -text 04[[:space:]]-[[:space:]]Practical[[:space:]]Testing[[:space:]]Process[[:space:]]When[[:space:]]Tester[[:space:]]find[[:space:]]a[[:space:]]Bug[[:space:]]and[[:space:]]do[[:space:]]Bug[[:space:]]Reporting/006[[:space:]]Difference[[:space:]]between[[:space:]]Smoke[[:space:]]Testing[[:space:]]&[[:space:]]Sanity[[:space:]]Testing.mp4 filter=lfs diff=lfs merge=lfs -text 05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/004[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]ID[[:space:]][[:space:]]Test[[:space:]]Case[[:space:]]Number.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/003[[:space:]]Standard[[:space:]]Test[[:space:]]Case[[:space:]]Format.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/006[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Pre-Conditions.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/005[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Description.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/007[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Steps.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/010[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Actual[[:space:]]Result[[:space:]]and[[:space:]]Status.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/011[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Comments.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/009[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Expected[[:space:]]Result.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/008[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Test[[:space:]]Data.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/014[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Bug[[:space:]]Id.mp4 filter=lfs diff=lfs merge=lfs -text +06[[:space:]]-[[:space:]]Test[[:space:]]Case[[:space:]]Designing[[:space:]]Techniques[[:space:]](BVA,[[:space:]]ECP,[[:space:]]Experienced[[:space:]]Based)/002[[:space:]]Boundary[[:space:]]Value[[:space:]]Analysis[[:space:]](BVA).mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/012[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Priority.mp4 filter=lfs diff=lfs merge=lfs -text +05[[:space:]]-[[:space:]]Design[[:space:]]Test[[:space:]]Cases[[:space:]][[:space:]]Effective[[:space:]]Test[[:space:]]Case[[:space:]]writing/013[[:space:]]Test[[:space:]]Case[[:space:]]Column[[:space:]][[:space:]]Type.mp4 filter=lfs diff=lfs merge=lfs -text diff --git a/05 - Design Test Cases Effective Test Case writing/003 Standard Test Case Format.mp4 b/05 - Design Test Cases Effective Test Case writing/003 Standard Test Case Format.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..f12e79e0c8390cc920fa804de94c4e4e75c2ff36 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/003 Standard Test Case Format.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4a88acfd93b59ddef546d30941158ea0301915a4eeeb86a606a7edae1563c58 +size 28819760 diff --git a/05 - Design Test Cases Effective Test Case writing/005 Test Case Column Description.mp4 b/05 - Design Test Cases Effective Test Case writing/005 Test Case Column Description.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..1989d6df84fb39cc5482ebb471516b68061f84e7 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/005 Test Case Column Description.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b1b9e9924b6eec65c7291f72945e8a2c0d7608ec9be4615253559332f848737 +size 21129804 diff --git a/05 - Design Test Cases Effective Test Case writing/006 Test Case Column Pre-Conditions.mp4 b/05 - Design Test Cases Effective Test Case writing/006 Test Case Column Pre-Conditions.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..d107ac1fe3809ae938924de3a7e41503f351e9a0 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/006 Test Case Column Pre-Conditions.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9bef6ae18cc104865c8716c1b8950e67beb64276f47a7966e2febf868fa87b0 +size 31031015 diff --git a/05 - Design Test Cases Effective Test Case writing/007 Test Case Column Steps.mp4 b/05 - Design Test Cases Effective Test Case writing/007 Test Case Column Steps.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..413ec9534028e2994168739879524e64c9e5df66 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/007 Test Case Column Steps.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d6d5c7cbb8a9af6204adf2183d4bc0a39fb7cd49f62b9e889dc741d2c44ded2 +size 33409555 diff --git a/05 - Design Test Cases Effective Test Case writing/008 Test Case Column Test Data.mp4 b/05 - Design Test Cases Effective Test Case writing/008 Test Case Column Test Data.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..79edbddfb7eabb748db5fb363d616b9ec0c20b84 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/008 Test Case Column Test Data.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb3c4b6996dd1c6e3c32a8cb8292d31f8ae899b01abea25fa801dcf1b00e273b +size 68813664 diff --git a/05 - Design Test Cases Effective Test Case writing/009 Test Case Column Expected Result.mp4 b/05 - Design Test Cases Effective Test Case writing/009 Test Case Column Expected Result.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..f543873de5171b814098d08f28ae9695e6ca7a06 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/009 Test Case Column Expected Result.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:799a1b93be511d36f522e6cb594eed415d7005d223ae3084bbd908a3c7fde23f +size 43390478 diff --git a/05 - Design Test Cases Effective Test Case writing/010 Test Case Column Actual Result and Status.mp4 b/05 - Design Test Cases Effective Test Case writing/010 Test Case Column Actual Result and Status.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..ac34580d019e53f95a218f27e54244d203c99ea8 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/010 Test Case Column Actual Result and Status.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:810d30044e3adc41c94bd2430f56f466f4f9c1559eb042fab5b0676584a70a35 +size 28567746 diff --git a/05 - Design Test Cases Effective Test Case writing/011 Test Case Column Comments.mp4 b/05 - Design Test Cases Effective Test Case writing/011 Test Case Column Comments.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..8646742bfee4df19ae34a5ee6e35e1009b0b83a2 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/011 Test Case Column Comments.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c301d7c13c76760896a2316a4080509e52871c4de5dafd65a46a92d0705a212 +size 13842136 diff --git a/05 - Design Test Cases Effective Test Case writing/012 Test Case Column Priority.mp4 b/05 - Design Test Cases Effective Test Case writing/012 Test Case Column Priority.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..cf73394c42a975395f0254ecdcb422880df411a8 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/012 Test Case Column Priority.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44b8cbdfacbdca4f5a07d84a72fe76e6ce45d5538b3996ebc4e9a1bfc7bb03f +size 38218638 diff --git a/05 - Design Test Cases Effective Test Case writing/013 Test Case Column Type.mp4 b/05 - Design Test Cases Effective Test Case writing/013 Test Case Column Type.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..c0a1ff307c330d07cbfab96e37d178b6ca083ddf --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/013 Test Case Column Type.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de22623e9d01b15a69db53efdedf303f870f53de91689e5e7537e8f497709a39 +size 40259497 diff --git a/05 - Design Test Cases Effective Test Case writing/014 Test Case Column Bug Id.mp4 b/05 - Design Test Cases Effective Test Case writing/014 Test Case Column Bug Id.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..2ac808b70d84d8ce5abeea4efc3e2deac7db20c0 --- /dev/null +++ b/05 - Design Test Cases Effective Test Case writing/014 Test Case Column Bug Id.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1612452c0fa006c2a10869cf8000309003946cce2bf8e63a5026539763a4db5d +size 13626987 diff --git a/06 - Test Case Designing Techniques (BVA, ECP, Experienced Based)/002 Boundary Value Analysis (BVA).mp4 b/06 - Test Case Designing Techniques (BVA, ECP, Experienced Based)/002 Boundary Value Analysis (BVA).mp4 new file mode 100644 index 0000000000000000000000000000000000000000..c3b928c1aaf202610745ae13c0d086d10068684c --- /dev/null +++ b/06 - Test Case Designing Techniques (BVA, ECP, Experienced Based)/002 Boundary Value Analysis (BVA).mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c7fbdf5b92290a766777192b057a3e0ddcadfd383d8e75e562a17d476e167cc +size 9799756 diff --git a/29 - Read & Write Excel Data(Xlsx file) OpenPyXl package (Advance Library)/003 Read All Rows & Cells Data_en.srt b/29 - Read & Write Excel Data(Xlsx file) OpenPyXl package (Advance Library)/003 Read All Rows & Cells Data_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..1e2a1f5dd06839c92e3f24607708b106f3d54752 --- /dev/null +++ b/29 - Read & Write Excel Data(Xlsx file) OpenPyXl package (Advance Library)/003 Read All Rows & Cells Data_en.srt @@ -0,0 +1,300 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:09,000 +So previously, we have seen how we can read data from Excel now to show you how we can read complete + +3 +00:00:09,000 --> 00:00:10,000 +data from the Excel myth. + +4 +00:00:11,000 --> 00:00:17,000 +Previously I was passing from which cell you want to read data, but now I'll show you how we can read + +5 +00:00:17,000 --> 00:00:23,000 +complete data from the Excel for reading the complete data from the Excel sheet. + +6 +00:00:23,000 --> 00:00:30,000 +First of all, we should be aware about how many rules we are having with the data and how many columns + +7 +00:00:30,000 --> 00:00:32,000 +we are having with data. + +8 +00:00:32,000 --> 00:00:36,000 +So first of all, we need to find out how many rules we are having, so find. + +9 +00:00:40,000 --> 00:00:51,000 +Roles, having data for that, we have option like I'm just storing into the rules and we have the option. + +10 +00:00:52,000 --> 00:00:57,000 +As such, Doc makes a rule. + +11 +00:00:57,000 --> 00:01:04,000 +It will find out how many rules we are having and in the same way I'm doing columns or columns is equal + +12 +00:01:04,000 --> 00:01:09,000 +to as such -- because rules and columns are inside the sheet. + +13 +00:01:09,000 --> 00:01:18,000 +So I mean, sheet object, not mix column, so that the maximum rules and maximum columns I want to + +14 +00:01:18,000 --> 00:01:23,000 +print and check it is able to fetch it successfully or not. + +15 +00:01:23,000 --> 00:01:32,000 +So print total rules are and rows variable is integer value. + +16 +00:01:32,000 --> 00:01:41,000 +So if I want to print, I have to type got into that string format in the same way I'm just copying + +17 +00:01:41,000 --> 00:01:45,000 +this total. + +18 +00:01:45,000 --> 00:01:51,000 +Columns are and here I'll come columns. + +19 +00:01:51,000 --> 00:01:51,000 +That's my variable. + +20 +00:01:52,000 --> 00:01:54,000 +I'm just going to execute this. + +21 +00:01:54,000 --> 00:01:55,000 +Let's see the answer of it. + +22 +00:01:57,000 --> 00:02:02,000 +OK, here, the variable is wrong, so total rules are for but the column we are getting into. + +23 +00:02:03,000 --> 00:02:10,000 +So I'm printing columns now, executing OK, the total rules should be four and column should be three. + +24 +00:02:11,000 --> 00:02:19,000 +So if we check it here for entry and if I show you my Excel sheet, we have four rows and three columns. + +25 +00:02:21,000 --> 00:02:25,000 +Now I want to read data from all the rules and all the columns for that. + +26 +00:02:25,000 --> 00:02:27,000 +You know how we can go for the law. + +27 +00:02:28,000 --> 00:02:30,000 +I'm going to look for. + +28 +00:02:31,000 --> 00:02:33,000 +First of all, I'm running a look for rules. + +29 +00:02:34,000 --> 00:02:45,000 +I in range and one to my rules, but I have two rules plus one. + +30 +00:02:45,000 --> 00:02:46,000 +Why I'm giving rules. + +31 +00:02:46,000 --> 00:02:56,000 ++1 whenever we are working on range and if we pass one to 10, the loop is going to execute one to nine + +32 +00:02:56,000 --> 00:03:00,000 +means it will skip the last value. + +33 +00:03:00,000 --> 00:03:07,000 +But here I don't want to skip because if my rules are 10, so I want to go from one to 10. + +34 +00:03:07,000 --> 00:03:11,000 +For that, I have just wasn't 11 here rules plus one. + +35 +00:03:12,000 --> 00:03:14,000 +So now if the rules are four. + +36 +00:03:15,000 --> 00:03:16,000 +So here the value is five. + +37 +00:03:17,000 --> 00:03:18,000 +So it will execute. + +38 +00:03:19,000 --> 00:03:22,000 +Loop will execute from one to four because last will you will skip. + +39 +00:03:23,000 --> 00:03:33,000 +In the same way I'm running a loop four columns in range, one and column. + +40 +00:03:35,000 --> 00:03:40,000 +Plus one, and we know why we are going for the one for printing the value, first of all, we need + +41 +00:03:40,000 --> 00:03:41,000 +to create a cell object. + +42 +00:03:41,000 --> 00:03:49,000 +The sea is equal to as such dot cell, which cell you want to work on. + +43 +00:03:49,000 --> 00:03:57,000 +I'm buzzing a comma g rule comma column and not print value. + +44 +00:03:57,000 --> 00:03:59,000 +Print C dot. + +45 +00:04:00,000 --> 00:04:00,000 +Well, you. + +46 +00:04:03,000 --> 00:04:05,000 +Just going to execute this. + +47 +00:04:08,000 --> 00:04:14,000 +And if you check it here, username and password one, hello, one that is coming from the Rogue One. + +48 +00:04:15,000 --> 00:04:21,000 +If you want to see username, password, hello one username, password, hello to username, password, + +49 +00:04:21,000 --> 00:04:25,000 +hello two, then third row four through. + +50 +00:04:26,000 --> 00:04:33,000 +So we are able to successfully pick all the data from Excel a C.. + +51 +00:04:33,000 --> 00:04:34,000 +I'll show you one more approach. + +52 +00:04:36,000 --> 00:04:43,000 +So what I'm doing, I'm just commenting these lines and I'll show you one more approach. + +53 +00:04:45,000 --> 00:04:57,000 +Other approaches we can pass, like for a row in and as such inside that we can do the range. + +54 +00:04:57,000 --> 00:05:01,000 +So I want to start from even to seat Fool. + +55 +00:05:02,000 --> 00:05:15,000 +So I'm saying from even to see Fool, I want to move from a two three four and are first of all, I'm + +56 +00:05:15,000 --> 00:05:17,000 +moving forward rows in this range. + +57 +00:05:18,000 --> 00:05:29,000 +Then in the same way, I'm running a loop for column in R means what I'm doing. + +58 +00:05:30,000 --> 00:05:34,000 +First of all, I'm moving for each row in this range. + +59 +00:05:35,000 --> 00:05:40,000 +And now I'm moving for each column in this row means whatever the row object is created over here. + +60 +00:05:41,000 --> 00:05:51,000 +And now I'm writing like Brain C dot value because C is a sell in that particular room running, it + +61 +00:05:52,000 --> 00:05:55,000 +will get done, so we'll get the same answer. + +62 +00:05:56,000 --> 00:05:58,000 +So that is very important to understand. + +63 +00:05:58,000 --> 00:06:02,000 +First of all, I'm giving the range like this range I want to work on. + +64 +00:06:03,000 --> 00:06:05,000 +So for each row in this range. + +65 +00:06:05,000 --> 00:06:12,000 +So we are putting out over here Ami's any object, then for each cell in this rule. + +66 +00:06:13,000 --> 00:06:14,000 +Just find out. + +67 +00:06:16,000 --> 00:06:17,000 +There is another approach in which we need. + +68 +00:06:18,000 --> 00:06:22,000 +We need to find out how many maximum rows are there, how many maximum cells are there. + +69 +00:06:22,000 --> 00:06:27,000 +You can do any range and we'll pick the value from that range. + +70 +00:06:29,000 --> 00:06:34,000 +So here we have seen two approaches by which we can pick complete data from Excel. + +71 +00:06:36,000 --> 00:06:43,000 +So here in the last few sessions we have scored how we can stall open excel, which is a package, how + +72 +00:06:43,000 --> 00:06:46,000 +we can work on Excel, how we can read data from the Excel. + +73 +00:06:46,000 --> 00:06:53,000 +So it could be one cell data or it could be all cell data, or it could be from a particular range. + +74 +00:06:55,000 --> 00:06:57,000 +So that's all we have for the session. + +75 +00:06:58,000 --> 00:06:59,000 +Thanks for watching this video. + diff --git a/29 - Read & Write Excel Data(Xlsx file) OpenPyXl package (Advance Library)/004 Write Data to Excel_en.srt b/29 - Read & Write Excel Data(Xlsx file) OpenPyXl package (Advance Library)/004 Write Data to Excel_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..238b3cf6f0655348d8aafc431d54832497cc4e8c --- /dev/null +++ b/29 - Read & Write Excel Data(Xlsx file) OpenPyXl package (Advance Library)/004 Write Data to Excel_en.srt @@ -0,0 +1,480 @@ +1 +00:00:00,000 --> 00:00:06,000 +Welcome to the testing world in previous session, we have seen how we can read data from the Excel + +2 +00:00:06,000 --> 00:00:10,000 +sheet now I'll show you how we can write data to the Excel file. + +3 +00:00:10,000 --> 00:00:13,000 +Moving to the project here, we can see that Excel Read code. + +4 +00:00:15,000 --> 00:00:17,000 +I'm just moving to create a new file. + +5 +00:00:18,000 --> 00:00:19,000 +Excellent. + +6 +00:00:20,000 --> 00:00:21,000 +Right. + +7 +00:00:22,000 --> 00:00:29,000 +Again, the steps are seen, first of all, we have to import package, so import open the way. + +8 +00:00:31,000 --> 00:00:33,000 +Now we need to create object the workbook, then sheet. + +9 +00:00:34,000 --> 00:00:40,000 +So W.K. is equal to open Excel Dot workbook. + +10 +00:00:41,000 --> 00:00:49,000 +That's a class with the workbook, so I'm carrying objeot of the workbook class now whenever we're building + +11 +00:00:49,000 --> 00:00:53,000 +object of the workbook, class of our book is created internally. + +12 +00:00:53,000 --> 00:00:59,000 +As of now, it's not saved, but it is created and by default we have a sheet over there with the name + +13 +00:00:59,000 --> 00:01:01,000 +sheet if you want to check it. + +14 +00:01:01,000 --> 00:01:06,000 +So we know that if you have only one sheet that will be active, I'm going for the active sheet. + +15 +00:01:07,000 --> 00:01:09,000 +And then I'm finding out the title. + +16 +00:01:09,000 --> 00:01:15,000 +So hope you remember previously we have seen how we can find out the title of active sheet. + +17 +00:01:17,000 --> 00:01:19,000 +So I'm just running this. + +18 +00:01:19,000 --> 00:01:21,000 +You will notice it will show sheet. + +19 +00:01:23,000 --> 00:01:28,000 +There is sheet so means once it is by default, created when we are going for the logbook. + +20 +00:01:29,000 --> 00:01:36,000 +No, I want to change the name of that sheet and then want to enter data into it. + +21 +00:01:37,000 --> 00:01:44,000 +So first of all, I'm going to switch with just sheet object W.K. Dot Active, whatever the active sheet, + +22 +00:01:45,000 --> 00:01:48,000 +just great object of object for that and store into the assets. + +23 +00:01:49,000 --> 00:01:53,000 +No, I'm just giving link as such dot title. + +24 +00:01:53,000 --> 00:02:00,000 +I want to change the name of that and I want to keep the name like, hello testing word. + +25 +00:02:00,000 --> 00:02:02,000 +That's the name I want to give to the sheet. + +26 +00:02:02,000 --> 00:02:10,000 +OK, now if I want to print the name of the sheet, so I'm seeing print, that's a sheet object and + +27 +00:02:10,000 --> 00:02:11,000 +paper. + +28 +00:02:13,000 --> 00:02:14,000 +I'm just running it. + +29 +00:02:17,000 --> 00:02:18,000 +Here. + +30 +00:02:18,000 --> 00:02:25,000 +Hello, distinguished so by default, when we created one book object, we only one sheet. + +31 +00:02:25,000 --> 00:02:29,000 +So first of all, I take on the object of the sheet and stare into the S.H.. + +32 +00:02:29,000 --> 00:02:35,000 +No finding notch in the title of that and fetching the title of that fetching and displaying the title + +33 +00:02:35,000 --> 00:02:35,000 +of that. + +34 +00:02:36,000 --> 00:02:43,000 +No, I want to put any data into the sheet as such and which sell. + +35 +00:02:43,000 --> 00:02:49,000 +You want to work on something a full. + +36 +00:02:50,000 --> 00:02:51,000 +Right. + +37 +00:02:51,000 --> 00:02:54,000 +Dot value, what value you want to give? + +38 +00:02:54,000 --> 00:03:03,000 +I want to give like w w w tha testing word dot com, I want to put this value. + +39 +00:03:04,000 --> 00:03:09,000 +After that, I want to save my sheet because that is taking place in the memory. + +40 +00:03:10,000 --> 00:03:11,000 +I want to see it. + +41 +00:03:11,000 --> 00:03:12,000 +So look at Dot. + +42 +00:03:12,000 --> 00:03:14,000 +See very, very. + +43 +00:03:14,000 --> 00:03:15,000 +You want to save it. + +44 +00:03:16,000 --> 00:03:22,000 +I want to save it in the ether with the name byte sheet dot. + +45 +00:03:23,000 --> 00:03:24,000 +Excellent X. + +46 +00:03:27,000 --> 00:03:29,000 +Now, everything is done just running it. + +47 +00:03:32,000 --> 00:03:35,000 +And if you're not getting any error means it is executed. + +48 +00:03:36,000 --> 00:03:49,000 +I'm just moving to that location, so I'll drive by 10 Sheet Dot X X that is going to be open and we + +49 +00:03:49,000 --> 00:03:51,000 +are getting on a fossil. + +50 +00:03:51,000 --> 00:03:52,000 +We are getting this data. + +51 +00:03:53,000 --> 00:03:55,000 +And you can check sheet name here. + +52 +00:03:57,000 --> 00:04:05,000 +So here we have seen how we can write data to the data sheet, which is by default created in the workbook. + +53 +00:04:06,000 --> 00:04:12,000 +OK, now I want to create one more sheet, so we have the option like. + +54 +00:04:15,000 --> 00:04:19,000 +I'm just going for a book because she is going to be created inside the workbook. + +55 +00:04:21,000 --> 00:04:23,000 +Create sheet. + +56 +00:04:25,000 --> 00:04:25,000 +Here. + +57 +00:04:25,000 --> 00:04:27,000 +What is the title you want to give? + +58 +00:04:27,000 --> 00:04:32,000 +So I'm saying data is equal to and my title is Lake. + +59 +00:04:34,000 --> 00:04:35,000 +Distinct W. + +60 +00:04:36,000 --> 00:04:37,000 +OK. + +61 +00:04:38,000 --> 00:04:39,000 +I'm just running Discord. + +62 +00:04:40,000 --> 00:04:41,000 +And let's see. + +63 +00:04:41,000 --> 00:04:43,000 +The sheet is created or not. + +64 +00:04:44,000 --> 00:04:48,000 +OK, let's open that. + +65 +00:04:48,000 --> 00:04:50,000 +So if you check it, one more shoot is created. + +66 +00:04:53,000 --> 00:04:55,000 +No, now, total, we have two sheets. + +67 +00:04:57,000 --> 00:05:01,000 +I want to enter data into the next sheet now. + +68 +00:05:01,000 --> 00:05:03,000 +First, we have entered into the first sheet. + +69 +00:05:03,000 --> 00:05:04,000 +Now the second sheet is graded. + +70 +00:05:05,000 --> 00:05:07,000 +I want to enter data into the second sheet. + +71 +00:05:07,000 --> 00:05:08,000 +So here. + +72 +00:05:09,000 --> 00:05:15,000 +Second sheet is created and here we have the first sheet. + +73 +00:05:15,000 --> 00:05:17,000 +We entered into it. + +74 +00:05:18,000 --> 00:05:20,000 +Now I want to enter it into the second sheet. + +75 +00:05:20,000 --> 00:05:24,000 +So we need to create object with the sheet, something as such one. + +76 +00:05:25,000 --> 00:05:29,000 +And we know that we have seen this approach while reading the data from the Excel. + +77 +00:05:30,000 --> 00:05:32,000 +So I want to create object with the sheet. + +78 +00:05:32,000 --> 00:05:33,000 +Second sheet. + +79 +00:05:34,000 --> 00:05:39,000 +So I'm just passing the name, which is distinct. + +80 +00:05:39,000 --> 00:05:41,000 +W. So that's my one. + +81 +00:05:42,000 --> 00:05:43,000 +And what data you want? + +82 +00:05:43,000 --> 00:05:45,000 +Enter such one. + +83 +00:05:45,000 --> 00:05:51,000 +And on the place of a three, you want to give data like, that's our phone number. + +84 +00:05:52,000 --> 00:05:57,000 +If seven four three nine one three one two one and it's a plus. + +85 +00:06:00,000 --> 00:06:00,000 +Line one. + +86 +00:06:01,000 --> 00:06:08,000 +So that is a data which I want to enter at the end we are saving, so once we save, it is going to + +87 +00:06:08,000 --> 00:06:10,000 +save all the sheets because we are saving workbook. + +88 +00:06:13,000 --> 00:06:15,000 +I'm just running it. + +89 +00:06:19,000 --> 00:06:20,000 +It is done. + +90 +00:06:20,000 --> 00:06:21,000 +Let me show you again. + +91 +00:06:22,000 --> 00:06:27,000 +So there is a shift in focus, should we have this if data? + +92 +00:06:27,000 --> 00:06:30,000 +And in second shift, we hear it through data. + +93 +00:06:32,000 --> 00:06:35,000 +So we have created two sheets and we have some data into it. + +94 +00:06:37,000 --> 00:06:39,000 +No, it might be possible. + +95 +00:06:39,000 --> 00:06:41,000 +You want to remove any sheet. + +96 +00:06:42,000 --> 00:06:44,000 +So we have the option for that as well. + +97 +00:06:44,000 --> 00:06:50,000 +So now I'll show you the more sheet and I want to remove the first sheet that we have created, which + +98 +00:06:50,000 --> 00:06:51,000 +is this. + +99 +00:06:52,000 --> 00:06:57,000 +So we have approved for that W.K. workbook. + +100 +00:06:57,000 --> 00:06:58,000 +Don't remove. + +101 +00:07:01,000 --> 00:07:05,000 +Sheet, but which should you want to remove, so we need to create object for that. + +102 +00:07:05,000 --> 00:07:09,000 +So what we can do W.K. Dark. + +103 +00:07:12,000 --> 00:07:19,000 +W.K. and in single course, we can give the name of the shoot, even you can pass such as well because + +104 +00:07:19,000 --> 00:07:21,000 +we have already created the object of that shoot. + +105 +00:07:21,000 --> 00:07:23,000 +Or you can directly create object here. + +106 +00:07:25,000 --> 00:07:26,000 +Now I'm running it. + +107 +00:07:28,000 --> 00:07:35,000 +It is showing that method is deprecated so you can go for remove only. + +108 +00:07:35,000 --> 00:07:39,000 +So it is done, but still it is deprecated. + +109 +00:07:39,000 --> 00:07:40,000 +You can use the latest one. + +110 +00:07:40,000 --> 00:07:43,000 +So let me show you first that she just deleted. + +111 +00:07:43,000 --> 00:07:46,000 +But if you want, I can show you again. + +112 +00:07:47,000 --> 00:07:49,000 +We can use, not remove it. + +113 +00:07:49,000 --> 00:07:51,000 +We can use, only remove. + +114 +00:07:52,000 --> 00:07:53,000 +So still, it will work. + +115 +00:08:00,000 --> 00:08:07,000 +It is done so here, if you take it here, that this sheet will be visible this time. + +116 +00:08:08,000 --> 00:08:12,000 +So we have seen previously we have a method we remove under scoresheet. + +117 +00:08:12,000 --> 00:08:18,000 +Now we remove method and we need to pass the object of the sheet, not the name only. + +118 +00:08:20,000 --> 00:08:24,000 +So here in this session, we have gone through how we can write data to the Excel file. + +119 +00:08:25,000 --> 00:08:27,000 +That's all we have for the session. + +120 +00:08:27,000 --> 00:08:29,000 +Thanks for watching this video. + diff --git a/30 - Learn Element Locators/001 Section Introduction & Practice Target_en.srt b/30 - Learn Element Locators/001 Section Introduction & Practice Target_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..096bfb9ea571a79fed88cd4b3a9e4ecf0ac17023 --- /dev/null +++ b/30 - Learn Element Locators/001 Section Introduction & Practice Target_en.srt @@ -0,0 +1,100 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:06,000 +So previously, we have completed the installation process. + +3 +00:00:07,000 --> 00:00:08,000 +Now I'll show you the next section. + +4 +00:00:09,000 --> 00:00:12,000 +And this is the introduction videos of the section. + +5 +00:00:12,000 --> 00:00:15,000 +So here we are going to cover element locators. + +6 +00:00:16,000 --> 00:00:25,000 +So as I have updated in the previous video where we have covered learning roadmap before moving to the + +7 +00:00:25,000 --> 00:00:28,000 +actual automation, you are using selenium and python. + +8 +00:00:28,000 --> 00:00:32,000 +First of all, we have to cover element locators. + +9 +00:00:32,000 --> 00:00:38,000 +So element locators are used to locate or search different elements on the web page. + +10 +00:00:39,000 --> 00:00:45,000 +If we take an example, you are working on the Facebook dot com you want to enter username, then you + +11 +00:00:45,000 --> 00:00:46,000 +want to enter password. + +12 +00:00:47,000 --> 00:00:54,000 +So for entering the username or password, we have to look uniquely locate this element so that we can + +13 +00:00:54,000 --> 00:00:55,000 +perform action on. + +14 +00:00:55,000 --> 00:01:00,000 +That means we can type some text on there for locating different elements. + +15 +00:01:00,000 --> 00:01:02,000 +We are going to use element locators. + +16 +00:01:03,000 --> 00:01:06,000 +That's a prerequisite before moving to the actual automation. + +17 +00:01:06,000 --> 00:01:14,000 +Using selenium here in this section and in next section, we are going to cover different types of different + +18 +00:01:14,000 --> 00:01:15,000 +techniques to look at element. + +19 +00:01:16,000 --> 00:01:21,000 +Also, we're going to cover best practices of the ultimate scenarios and quiz. + +20 +00:01:22,000 --> 00:01:26,000 +So here these two sections working with the element locators. + +21 +00:01:26,000 --> 00:01:31,000 +And then we are going to cover export element locator in detail. + +22 +00:01:31,000 --> 00:01:36,000 +So these are the two sections which we are going to cover for learning element locators. + +23 +00:01:37,000 --> 00:01:42,000 +Also, you will get some quiz here to verify your learning. + +24 +00:01:43,000 --> 00:01:48,000 +Let's move to the different techniques of locating element that is already here. + +25 +00:01:49,000 --> 00:01:50,000 +Thanks for watching. + diff --git a/30 - Learn Element Locators/002 What is Element Locators Why we use Element Locators_en.srt b/30 - Learn Element Locators/002 What is Element Locators Why we use Element Locators_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..48f6b478b39c11fa5bb58691d53471903d171dd3 --- /dev/null +++ b/30 - Learn Element Locators/002 What is Element Locators Why we use Element Locators_en.srt @@ -0,0 +1,352 @@ +1 +00:00:00,000 --> 00:00:07,000 +Welcome to the testing world in this session, you're going to understand what is element locators. + +2 +00:00:08,000 --> 00:00:10,000 +So first of all, we need to understand what is elemental. + +3 +00:00:11,000 --> 00:00:15,000 +And then we can check how we are going to fetch element crookedness. + +4 +00:00:16,000 --> 00:00:22,000 +But before going to the technical definition, I'd take an example and we have a group of students and + +5 +00:00:22,000 --> 00:00:24,000 +I want to ask a question. + +6 +00:00:24,000 --> 00:00:31,000 +So whenever I'm asking a question, I'm not pointing out any specific student. + +7 +00:00:31,000 --> 00:00:33,000 +In that case, it might be possible. + +8 +00:00:33,000 --> 00:00:37,000 +Nobody is going to reply me or more than one person. + +9 +00:00:37,000 --> 00:00:43,000 +I'm going to reply, but I want to ask a question from a specific person. + +10 +00:00:43,000 --> 00:00:48,000 +So what I have to do, I have prepared a specific property of the person. + +11 +00:00:48,000 --> 00:00:50,000 +It could be the name of the person. + +12 +00:00:50,000 --> 00:00:50,000 +It could be. + +13 +00:00:50,000 --> 00:00:58,000 +I knew the person or it could be any other property in the CV when we are going for the automation and + +14 +00:00:58,000 --> 00:01:00,000 +we are going to automate any web page. + +15 +00:01:00,000 --> 00:01:05,000 +And I want to perform action on any specific element. + +16 +00:01:05,000 --> 00:01:06,000 +OK, let's take an example. + +17 +00:01:07,000 --> 00:01:10,000 +I'm just moving to I'm just going to the browser here. + +18 +00:01:10,000 --> 00:01:14,000 +I'm thinking example, like, I want to automate this Facebook dot com. + +19 +00:01:15,000 --> 00:01:21,000 +So here I want to automate its log in functionality for automating this functionality. + +20 +00:01:21,000 --> 00:01:23,000 +I need to enter username. + +21 +00:01:24,000 --> 00:01:30,000 +If I write automation script in which I'm saying OK and then use username in a text box, but which + +22 +00:01:30,000 --> 00:01:31,000 +textbooks? + +23 +00:01:31,000 --> 00:01:37,000 +Because they're on the page, we are getting many text boxes, so we have to look at that specific text + +24 +00:01:37,000 --> 00:01:40,000 +box by its unique property. + +25 +00:01:40,000 --> 00:01:40,000 +It could be it. + +26 +00:01:40,000 --> 00:01:43,000 +It could be name or it could be anything else. + +27 +00:01:43,000 --> 00:01:47,000 +So locate any element uniquely on the page. + +28 +00:01:47,000 --> 00:01:49,000 +The linking element locators. + +29 +00:01:49,000 --> 00:01:55,000 +So if I come to the technical definition of Element Locator with the Help Element Locator, we can locate + +30 +00:01:56,000 --> 00:01:58,000 +any element uniquely on the page. + +31 +00:01:58,000 --> 00:02:03,000 +So for you to look it in the element, uniquely, we are going to use element locators. + +32 +00:02:05,000 --> 00:02:07,000 +We have different type of element locators. + +33 +00:02:08,000 --> 00:02:10,000 +We have different types of element locators. + +34 +00:02:11,000 --> 00:02:18,000 +I have listed few common locators, which we are going to use very frequently, like ID, name, last + +35 +00:02:18,000 --> 00:02:20,000 +name, SEISS and export. + +36 +00:02:21,000 --> 00:02:24,000 +But our agenda here to understand SEISS and export. + +37 +00:02:26,000 --> 00:02:28,000 +First, I'm going to show you how we can use this element locator. + +38 +00:02:29,000 --> 00:02:32,000 +Then I'll show you a detailed understanding of export. + +39 +00:02:33,000 --> 00:02:39,000 +But before moving to see this as an export, we need some plug ins to be installed on the browser. + +40 +00:02:40,000 --> 00:02:46,000 +So first of all, I would just move the browser and whatever the element you want to work on, or whichever + +41 +00:02:46,000 --> 00:02:48,000 +the element you want to work on. + +42 +00:02:48,000 --> 00:02:54,000 +First of all, we need to check of that element or that just right, and we have optional to inspect. + +43 +00:02:55,000 --> 00:02:57,000 +This option is not specific to the browser. + +44 +00:02:57,000 --> 00:03:00,000 +So if you're working on the Chrome, you are going to get this option. + +45 +00:03:00,000 --> 00:03:04,000 +If you're working on the Firefox, also, you will get this option. + +46 +00:03:04,000 --> 00:03:10,000 +If I right click a link to that option inspect element almost on all browsers, you are going to get + +47 +00:03:10,000 --> 00:03:12,000 +this option. + +48 +00:03:12,000 --> 00:03:17,000 +So whichever the element we want to locate, we have to go to the extension of that element. + +49 +00:03:17,000 --> 00:03:23,000 +Also, we need to install some plugins, so I'm going to show you one plug in which we need to install, + +50 +00:03:24,000 --> 00:03:26,000 +which we are going to install on Chrome browser. + +51 +00:03:27,000 --> 00:03:30,000 +If you're looking to Chrome, just go to the Google. + +52 +00:03:31,000 --> 00:03:39,000 +And here we are, going to get a plugin with the name ceases and export checker. + +53 +00:03:39,000 --> 00:03:43,000 +So this plugin is going to be stored on the Chrome browser. + +54 +00:03:43,000 --> 00:03:44,000 +I'm just installing it. + +55 +00:03:47,000 --> 00:03:54,000 +Add to Chrome so that it's going to be installed and you will find this an extension. + +56 +00:03:55,000 --> 00:03:58,000 +It would take some time to complete this installation process. + +57 +00:03:58,000 --> 00:04:03,000 +So I'm just waiting for this installation to be completed once it is done. + +58 +00:04:03,000 --> 00:04:09,000 +You will get this option here on the right hand side of the browser top right corner of the browser. + +59 +00:04:09,000 --> 00:04:11,000 +So once we get it, yes, we haven't started. + +60 +00:04:12,000 --> 00:04:16,000 +I'll show you how we're going to use it in the same way on Firefox. + +61 +00:04:17,000 --> 00:04:19,000 +We can install selenium ide e. + +62 +00:04:20,000 --> 00:04:21,000 +Why do we need to install today anyway? + +63 +00:04:22,000 --> 00:04:23,000 +I'll show you, but it's a free tool. + +64 +00:04:24,000 --> 00:04:24,000 +Just install it. + +65 +00:04:25,000 --> 00:04:30,000 +So I just click on the download selenium and here I'm searching for it. + +66 +00:04:31,000 --> 00:04:33,000 +So anybody for Firefox? + +67 +00:04:33,000 --> 00:04:35,000 +So I'm just starting this on the Firefox browser. + +68 +00:04:37,000 --> 00:04:40,000 +So the I'm getting this option and Firefox, Econet and. + +69 +00:04:45,000 --> 00:04:51,000 +OK, so no stadium I'd installed on the Firefox browser, no. + +70 +00:04:52,000 --> 00:04:54,000 +So we installed these two plugins. + +71 +00:04:54,000 --> 00:04:57,000 +Now the point is why we installed these plugins. + +72 +00:04:57,000 --> 00:04:58,000 +What's the use of that? + +73 +00:04:58,000 --> 00:05:05,000 +So whenever we're writing any CSIS and spot for any automation tool, it's not especially good selenium + +74 +00:05:05,000 --> 00:05:07,000 +only if you're working on APM. + +75 +00:05:07,000 --> 00:05:14,000 +Daniel also testing whether the best application you need these locators in the same way if you're working + +76 +00:05:14,000 --> 00:05:19,000 +on Ketlen Studio, if you're working on water. + +77 +00:05:19,000 --> 00:05:25,000 +So almost all automation, which are working on the web based application, are supporting these CCS + +78 +00:05:25,000 --> 00:05:27,000 +and export at Element. + +79 +00:05:27,000 --> 00:05:34,000 +So whenever you are working on any automation tool and I want to use any element locator so we can find + +80 +00:05:34,000 --> 00:05:38,000 +out element locator by the techniques which we're going to understand in this course. + +81 +00:05:39,000 --> 00:05:43,000 +But before using that, I want to check the technique is correct or not. + +82 +00:05:43,000 --> 00:05:47,000 +So these techniques can be checked by using these plugins. + +83 +00:05:48,000 --> 00:05:54,000 +So whatever the locator, I'm going to find out in the coming sessions, I just check it on these plugins. + +84 +00:05:55,000 --> 00:05:56,000 +Is it correct or not? + +85 +00:05:57,000 --> 00:05:58,000 +So I'll show you how we can do that. + +86 +00:05:59,000 --> 00:06:05,000 +So in this session, we have seen what is elemental locator and we have done some setup on Firefox and + +87 +00:06:05,000 --> 00:06:06,000 +Chrome browser. + +88 +00:06:07,000 --> 00:06:10,000 +That's all we have for the session tags watching this video. + diff --git a/30 - Learn Element Locators/003 Understand basics of HTML to Fetch Element Locators_en.srt b/30 - Learn Element Locators/003 Understand basics of HTML to Fetch Element Locators_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..8a38fa2ea908ecf2262dee2f14cfb714306d4e4a --- /dev/null +++ b/30 - Learn Element Locators/003 Understand basics of HTML to Fetch Element Locators_en.srt @@ -0,0 +1,568 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the wrestling world. + +2 +00:00:02,000 --> 00:00:09,000 +So in previous session, we have seen what is element locator and also we have seen two plugins. + +3 +00:00:10,000 --> 00:00:16,000 +One is CIUSSS, an export checker, which we have installed on Chrome and other one this name I.D., + +4 +00:00:16,000 --> 00:00:18,000 +which you have installed on Firefox. + +5 +00:00:18,000 --> 00:00:23,000 +So in this session, I'll show you a basic understanding of HDMI. + +6 +00:00:23,000 --> 00:00:27,000 +And also, I'll show you what is the use of installed plugins? + +7 +00:00:28,000 --> 00:00:31,000 +First of all, I'll give you a basic understanding of HDMI. + +8 +00:00:32,000 --> 00:00:35,000 +We are not going to understand details of the HDMI here. + +9 +00:00:35,000 --> 00:00:41,000 +We will understand only the part which is required for us for fetching element locators. + +10 +00:00:42,000 --> 00:00:46,000 +So I'm just moving to the browser first and I'm taking example. + +11 +00:00:46,000 --> 00:00:52,000 +I have an application like the testing word dot com for much less testing. + +12 +00:00:52,000 --> 00:00:56,000 +So it's a simple website which we are going to use for fetching element locators. + +13 +00:00:56,000 --> 00:00:58,000 +Okay, an example. + +14 +00:00:58,000 --> 00:01:00,000 +I want to work on this text box. + +15 +00:01:00,000 --> 00:01:02,000 +I just right click Inspect. + +16 +00:01:04,000 --> 00:01:07,000 +We will get estimates of the textbooks here. + +17 +00:01:07,000 --> 00:01:10,000 +I'll just copy this a.m.. + +18 +00:01:13,000 --> 00:01:14,000 +And I'm taking it to the. + +19 +00:01:16,000 --> 00:01:23,000 +Here, so normally, if you're aware about achievement, so here it still is written in the form of + +20 +00:01:23,000 --> 00:01:27,000 +Peg's means, each element is having a tag. + +21 +00:01:27,000 --> 00:01:29,000 +So here my bag is input. + +22 +00:01:30,000 --> 00:01:35,000 +So this this is the starting tag we just started from here and it here and the end bag. + +23 +00:01:35,000 --> 00:01:40,000 +So whenever we are going to use name, big bag means this. + +24 +00:01:40,000 --> 00:01:43,000 +So here in our case, the tag is input. + +25 +00:01:43,000 --> 00:01:46,000 +OK, let me take you a different example. + +26 +00:01:47,000 --> 00:01:51,000 +I'm just trying to locate any other element like this dropdown. + +27 +00:01:52,000 --> 00:01:58,000 +So if you check it here in the dropdown bag is select so we can have any dig. + +28 +00:01:59,000 --> 00:02:03,000 +If you talk about this radio button, I'll just right click Inspect. + +29 +00:02:03,000 --> 00:02:10,000 +And here the biggest input in the same way, I'm just coming to this link and I'll just check it. + +30 +00:02:10,000 --> 00:02:16,000 +The stimulus tag is a so we can have any tick, but we must understand that is big. + +31 +00:02:18,000 --> 00:02:18,000 +OK? + +32 +00:02:19,000 --> 00:02:23,000 +What are the values which we are getting with starting dog? + +33 +00:02:23,000 --> 00:02:27,000 +So my starting tag is started from here till this point. + +34 +00:02:27,000 --> 00:02:32,000 +So other than tick, what are the values you are getting that is called attributes? + +35 +00:02:32,000 --> 00:02:41,000 +So here in our case, we have many attributes like class name, required type, placeholder value. + +36 +00:02:41,000 --> 00:02:44,000 +Foo Attribute Values are there if you are blank. + +37 +00:02:44,000 --> 00:02:46,000 +But these all are attributes. + +38 +00:02:47,000 --> 00:02:50,000 +So now we go to understanding what is DAG? + +39 +00:02:50,000 --> 00:02:58,000 +So if I take an example like, that's my dog and I'll just change the color, that's my tick. + +40 +00:02:58,000 --> 00:03:00,000 +What all the attributes we are having. + +41 +00:03:00,000 --> 00:03:04,000 +So we have many attributes here, like class is one attribute. + +42 +00:03:05,000 --> 00:03:09,000 +So that is my class name is another attribute. + +43 +00:03:09,000 --> 00:03:13,000 +So that is a second attribute required is the third attribute. + +44 +00:03:13,000 --> 00:03:17,000 +So what are the values we are getting here with the starting date? + +45 +00:03:17,000 --> 00:03:20,000 +This is what attribute type is one attribute. + +46 +00:03:20,000 --> 00:03:22,000 +So we have many attributes here. + +47 +00:03:23,000 --> 00:03:28,000 +Sometimes you will notice there is a text written between starting tag and tag. + +48 +00:03:29,000 --> 00:03:35,000 +So the text, which is written between the starting tag and take it, is not mandatory that this text + +49 +00:03:35,000 --> 00:03:36,000 +will always be here. + +50 +00:03:36,000 --> 00:03:39,000 +But if it is here, that is called in the text. + +51 +00:03:40,000 --> 00:03:42,000 +So here that is my inner text. + +52 +00:03:43,000 --> 00:03:50,000 +So we have seen yellow is that big, red are the attributes and we have few more attributes, which + +53 +00:03:50,000 --> 00:03:51,000 +I did not mention. + +54 +00:03:51,000 --> 00:03:54,000 +Like, if I highlight this, this is all to attribute. + +55 +00:03:55,000 --> 00:04:01,000 +And if we have some data between the tags means the starting date, and that is what inner text. + +56 +00:04:01,000 --> 00:04:09,000 +So while writing add element locators or say while writing this and x export, we are going to use tags, + +57 +00:04:09,000 --> 00:04:11,000 +attributes and in our text. + +58 +00:04:12,000 --> 00:04:12,000 +OK. + +59 +00:04:12,000 --> 00:04:19,000 +Let me go to any other example like I'm just moving to the browser and I want to work on this link. + +60 +00:04:19,000 --> 00:04:23,000 +So if we check it here, this is a link that gives it here. + +61 +00:04:24,000 --> 00:04:28,000 +And if I ask you, can you tell me what all the attributes we are having? + +62 +00:04:28,000 --> 00:04:30,000 +So First Attribute is a giraffe. + +63 +00:04:31,000 --> 00:04:34,000 +Then we have a style and then we have a class. + +64 +00:04:35,000 --> 00:04:37,000 +So these are the three attributes we are having. + +65 +00:04:38,000 --> 00:04:40,000 +If I ask you, OK, what is in our text over here? + +66 +00:04:41,000 --> 00:04:47,000 +So if we check it, that is my starting tag and there is a big starting take is completed here. + +67 +00:04:48,000 --> 00:04:54,000 +So the data, which is written between the starting Typekit and big, which is the details that is in + +68 +00:04:54,000 --> 00:04:54,000 +the text. + +69 +00:04:56,000 --> 00:04:58,000 +OK, let me take you one more example. + +70 +00:04:58,000 --> 00:05:02,000 +I want to work on this log in, so I just right click Inspect. + +71 +00:05:02,000 --> 00:05:06,000 +So if you check it here, in this case, my bag is label. + +72 +00:05:08,000 --> 00:05:12,000 +And if you notice, if I ask you what all the attributes we are having. + +73 +00:05:12,000 --> 00:05:16,000 +So in this case, we have only one attribute, which is four. + +74 +00:05:17,000 --> 00:05:19,000 +And if I ask you what is in our text? + +75 +00:05:20,000 --> 00:05:21,000 +So in our texters, log in. + +76 +00:05:22,000 --> 00:05:31,000 +So here, by going through any external element, we can find out tag attributes in our text and we + +77 +00:05:31,000 --> 00:05:33,000 +are going to use tag attributes. + +78 +00:05:33,000 --> 00:05:36,000 +And in our text, we're writing our export mixes. + +79 +00:05:38,000 --> 00:05:45,000 +So first, we have seen basics of achievement to use of plugging OK from the next section onwards. + +80 +00:05:46,000 --> 00:05:53,000 +We are going to write C assistant export, but when we're writing C assistant or export, how we can + +81 +00:05:53,000 --> 00:05:56,000 +make sure the syntax we have written is correct or not. + +82 +00:05:57,000 --> 00:06:00,000 +So in that case, these plug ins are going to help us. + +83 +00:06:01,000 --> 00:06:06,000 +So first of all, I'll show you how we can use plug in on the Chrome browser, which is C assist and + +84 +00:06:06,000 --> 00:06:07,000 +export checker. + +85 +00:06:07,000 --> 00:06:11,000 +So I'm just coming to the Chrome browser and here I'm starting C assistant next budget. + +86 +00:06:12,000 --> 00:06:15,000 +First of all, you need to select, you want to go for the thesis or export. + +87 +00:06:16,000 --> 00:06:17,000 +I'm waiting for the scissors. + +88 +00:06:17,000 --> 00:06:19,000 +OK, what's the assist you want to see? + +89 +00:06:20,000 --> 00:06:20,000 +Want to use? + +90 +00:06:20,000 --> 00:06:32,000 +So I'm saying, okay, my thesis is label and we're a tribute for is equal to. + +91 +00:06:34,000 --> 00:06:40,000 +Deb, too, so I have written a particular cases as of no, you are not aware about the cases. + +92 +00:06:40,000 --> 00:06:42,000 +We need not bother about that. + +93 +00:06:42,000 --> 00:06:44,000 +We are going to learn it in the coming sessions. + +94 +00:06:44,000 --> 00:06:50,000 +But aside from just showing what are the scissors and export you're going to right, it will highlight + +95 +00:06:50,000 --> 00:06:53,000 +that element, the element or else the correct element is highlighted. + +96 +00:06:54,000 --> 00:06:57,000 +Means yes, you're getting the correct pieces or correct export. + +97 +00:06:57,000 --> 00:07:01,000 +But if you're giving any incorrect syntax or if you're using any wrong value. + +98 +00:07:01,000 --> 00:07:03,000 +So here I missed syntax. + +99 +00:07:03,000 --> 00:07:05,000 +I missed single code here. + +100 +00:07:05,000 --> 00:07:06,000 +So it is not highlighting. + +101 +00:07:06,000 --> 00:07:08,000 +It means that is not located. + +102 +00:07:09,000 --> 00:07:15,000 +If I use an incorrect value, still you will notice it is not highlighting anything means you're not + +103 +00:07:15,000 --> 00:07:16,000 +writing correct. + +104 +00:07:17,000 --> 00:07:22,000 +Theses seem we can test on Firefox browser. + +105 +00:07:22,000 --> 00:07:31,000 +So here I'm just starting my application and here to check my thesis or export this correct or not. + +106 +00:07:31,000 --> 00:07:36,000 +We can use this stadium I.D. So if you are working on the Firefox, you can easily name it. + +107 +00:07:37,000 --> 00:07:44,000 +OK, I started Stadium I.D. Once installed, you will get the option here on the top right corner here. + +108 +00:07:44,000 --> 00:07:48,000 +Use when we started the new I.D. it is asking for Would you like to create a new project? + +109 +00:07:48,000 --> 00:07:48,000 +Yes. + +110 +00:07:49,000 --> 00:07:50,000 +What are the names you want to give? + +111 +00:07:50,000 --> 00:07:51,000 +Just give it time. + +112 +00:07:51,000 --> 00:07:52,000 +Sync testing. + +113 +00:07:53,000 --> 00:07:53,000 +OK. + +114 +00:07:53,000 --> 00:07:56,000 +Would you like to record it as a console? + +115 +00:07:57,000 --> 00:07:59,000 +So I'm not going to record now. + +116 +00:07:59,000 --> 00:08:00,000 +Click on the first line. + +117 +00:08:00,000 --> 00:08:02,000 +And what are the command you want, right? + +118 +00:08:02,000 --> 00:08:04,000 +I'll just right click. + +119 +00:08:04,000 --> 00:08:06,000 +We are not going to use it, but I'm just writing the command. + +120 +00:08:06,000 --> 00:08:07,000 +Click. + +121 +00:08:07,000 --> 00:08:10,000 +Now come to the target and whatnot the element locator you are having. + +122 +00:08:10,000 --> 00:08:10,000 +You can write it. + +123 +00:08:11,000 --> 00:08:17,000 +So I want to test cases, so I just want to see if this is equal to and whatever the value you fetched + +124 +00:08:19,000 --> 00:08:20,000 +and the value was. + +125 +00:08:20,000 --> 00:08:20,000 +Step two. + +126 +00:08:21,000 --> 00:08:21,000 +OK. + +127 +00:08:21,000 --> 00:08:27,000 +Now click on this highlight find target on the page. + +128 +00:08:27,000 --> 00:08:32,000 +As you click on this, you will notice this area will be highlighted. + +129 +00:08:32,000 --> 00:08:33,000 +OK, let me show you again. + +130 +00:08:34,000 --> 00:08:35,000 +I just click here. + +131 +00:08:35,000 --> 00:08:37,000 +So you will notice that is highlighted. + +132 +00:08:37,000 --> 00:08:40,000 +So if it is highlighting means, yes, we are writing the correct locator. + +133 +00:08:41,000 --> 00:08:45,000 +If I write an incorrect value and try to locate it is not. + +134 +00:08:45,000 --> 00:08:48,000 +Highlighting anything means the element locator is not correct. + +135 +00:08:49,000 --> 00:08:50,000 +Or maybe Synaptics is not correct. + +136 +00:08:52,000 --> 00:08:55,000 +So here we have seen what is the use of plugins? + +137 +00:08:56,000 --> 00:09:02,000 +We are using these plugins just to check what all the locators we are writing are having correct syntax + +138 +00:09:02,000 --> 00:09:02,000 +or not. + +139 +00:09:03,000 --> 00:09:06,000 +And by that, we are locating correct element or not. + +140 +00:09:06,000 --> 00:09:12,000 +So before using this locator in our automation, we can just make sure by using these plugins. + +141 +00:09:14,000 --> 00:09:16,000 +So that's all we have for the session here. + +142 +00:09:16,000 --> 00:09:23,000 +We have seen what basic understanding of HTML and the use of plugins parents watching this video. + diff --git a/30 - Learn Element Locators/004 Locate or Search Element uniquely on the Page using Element-ID_en.srt b/30 - Learn Element Locators/004 Locate or Search Element uniquely on the Page using Element-ID_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..afc6e7e02f0e6b0b77c92bfa2776b6ab8fd7335f --- /dev/null +++ b/30 - Learn Element Locators/004 Locate or Search Element uniquely on the Page using Element-ID_en.srt @@ -0,0 +1,236 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +So previously we have seen what is Element Locator, all the plugins that we need to set up on the browser. + +3 +00:00:09,000 --> 00:00:12,000 +So we have set up CIUSSS, an expert checker. + +4 +00:00:13,000 --> 00:00:18,000 +Also, we have set up selenium edy and then we have seen basics of HDR. + +5 +00:00:19,000 --> 00:00:21,000 +So what does attribute what is in our text? + +6 +00:00:21,000 --> 00:00:23,000 +We got this understanding. + +7 +00:00:23,000 --> 00:00:31,000 +Now I'm moving to the First Element Locator, which is Edy, so we can locate any element to its. + +8 +00:00:32,000 --> 00:00:39,000 +If you check this a.m. So here in the estimate, the set idea of the element so we can use this ID to + +9 +00:00:39,000 --> 00:00:41,000 +look at an element unique to the page. + +10 +00:00:42,000 --> 00:00:42,000 +OK. + +11 +00:00:42,000 --> 00:00:46,000 +Let me show you on application. + +12 +00:00:46,000 --> 00:00:47,000 +So that's a facebook.com. + +13 +00:00:48,000 --> 00:00:50,000 +I want to look this username box. + +14 +00:00:51,000 --> 00:00:53,000 +I just right click Inspect. + +15 +00:00:53,000 --> 00:00:55,000 +So first of all, I'm moving to the estimate of the element. + +16 +00:00:58,000 --> 00:00:58,000 +OK. + +17 +00:00:58,000 --> 00:00:59,000 +That element is highlighted. + +18 +00:01:00,000 --> 00:01:06,000 +If you notice it is equal to e-mail, developers said this ID is equal to e-mail. + +19 +00:01:06,000 --> 00:01:09,000 +No, I can use this ID directly in my automation. + +20 +00:01:10,000 --> 00:01:15,000 +But before moving to that, I just want to check this idea is unique or not, because it might be possible. + +21 +00:01:15,000 --> 00:01:19,000 +We have five element of the page or 10 element of the page with the same ID. + +22 +00:01:20,000 --> 00:01:25,000 +So I want to check this I.D. is what is unique or not for that. + +23 +00:01:25,000 --> 00:01:25,000 +What we can do. + +24 +00:01:25,000 --> 00:01:30,000 +We can start selenium I.D. and start private previously. + +25 +00:01:31,000 --> 00:01:35,000 +And here I see, OK, record a new test. + +26 +00:01:36,000 --> 00:01:42,000 +I'm just giving the the best one click, OK, don't give any. + +27 +00:01:42,000 --> 00:01:44,000 +You are a little of so recording has not started yet. + +28 +00:01:45,000 --> 00:01:51,000 +As of now, I'm going to use the E just to highlight element through locator. + +29 +00:01:51,000 --> 00:01:54,000 +So let me show you here in command. + +30 +00:01:54,000 --> 00:01:56,000 +You can give any command I'm giving lately. + +31 +00:01:57,000 --> 00:02:01,000 +You can select any command here now in Target, you can write your locator. + +32 +00:02:01,000 --> 00:02:05,000 +So I'm going to use a locator ID and the value is email. + +33 +00:02:05,000 --> 00:02:08,000 +So I mention it is equal to email. + +34 +00:02:09,000 --> 00:02:09,000 +No. + +35 +00:02:10,000 --> 00:02:13,000 +I'll just reducing its sage. + +36 +00:02:13,000 --> 00:02:14,000 +That's my search button. + +37 +00:02:15,000 --> 00:02:16,000 +Find out how to get on the page. + +38 +00:02:16,000 --> 00:02:20,000 +So acyclic you will notice this, it is going to be highlighted. + +39 +00:02:20,000 --> 00:02:24,000 +So let me show you again if that area is highlighted. + +40 +00:02:24,000 --> 00:02:27,000 +Means yes, it is locating correct element. + +41 +00:02:28,000 --> 00:02:32,000 +But if we give any incorrect, will you like if I do email one and try to look it? + +42 +00:02:32,000 --> 00:02:36,000 +That is not highlighting means it is not locating that element. + +43 +00:02:36,000 --> 00:02:44,000 +So before taking this element locator to my automation, I can just verify here on the Lilium I.D. It + +44 +00:02:44,000 --> 00:02:45,000 +is correct or not. + +45 +00:02:45,000 --> 00:02:51,000 +So now if I click on Find Target on the page, it is highlighted highlighted means yes, it's correct + +46 +00:02:52,000 --> 00:02:52,000 +in the same way. + +47 +00:02:52,000 --> 00:02:54,000 +OK, let me show you one more example. + +48 +00:02:55,000 --> 00:02:59,000 +I'll just go to the password and that's the estimate of the password. + +49 +00:02:59,000 --> 00:03:01,000 +And if you check it, developer set, it is equal to pass. + +50 +00:03:01,000 --> 00:03:04,000 +I just want to check it OK for that. + +51 +00:03:04,000 --> 00:03:06,000 +I was just reducing the size of this estimate. + +52 +00:03:07,000 --> 00:03:11,000 +Now I'm coming here and I want to check it is equal to pass. + +53 +00:03:11,000 --> 00:03:18,000 +So if you know look identical to pass, just highlight so that password boxes highlighted again, you + +54 +00:03:18,000 --> 00:03:20,000 +can check it highlighted. + +55 +00:03:20,000 --> 00:03:26,000 +So if it is highlighting the correct element, yes, we are able to look at that element uniquely. + +56 +00:03:26,000 --> 00:03:29,000 +Now I can use this locator in my automation. + +57 +00:03:31,000 --> 00:03:34,000 +So here we have seen First Element Locator, which is it. + +58 +00:03:35,000 --> 00:03:37,000 +That's all we have for the session tags. + +59 +00:03:37,000 --> 00:03:38,000 +Watching this, we do. + diff --git a/30 - Learn Element Locators/005 Locate or Search Element uniquely on the Page using Element-Name_en.srt b/30 - Learn Element Locators/005 Locate or Search Element uniquely on the Page using Element-Name_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..37037db430cb3316cdd8d643c203573dd8e198f4 --- /dev/null +++ b/30 - Learn Element Locators/005 Locate or Search Element uniquely on the Page using Element-Name_en.srt @@ -0,0 +1,172 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:05,000 +So previously, we have seen how we can look locate element to it. + +3 +00:00:06,000 --> 00:00:10,000 +Now I'll show you how we can look it element through name. + +4 +00:00:11,000 --> 00:00:18,000 +So if you check in HDMI, if you have a name of the element so we can use this name for locating the + +5 +00:00:18,000 --> 00:00:19,000 +element. + +6 +00:00:20,000 --> 00:00:22,000 +But why should I go for the name? + +7 +00:00:22,000 --> 00:00:23,000 +If we already have the ID? + +8 +00:00:24,000 --> 00:00:26,000 +Yes, if you already have the ID, you can use it. + +9 +00:00:26,000 --> 00:00:27,000 +But it might be possible. + +10 +00:00:28,000 --> 00:00:32,000 +We do not have idea of the particular element, or it might be possible. + +11 +00:00:33,000 --> 00:00:35,000 +It is duplicate for the multiple element. + +12 +00:00:35,000 --> 00:00:41,000 +So if that is, I should move to the next element locator and the next locator is name so we can use + +13 +00:00:41,000 --> 00:00:43,000 +name to locate an element. + +14 +00:00:44,000 --> 00:00:45,000 +Let me show you. + +15 +00:00:45,000 --> 00:00:53,000 +So I'm just moving to browser here on Facebook.com and I just still of this user name box. + +16 +00:00:53,000 --> 00:00:58,000 +So here next year, if you check developer select name of the element, which is email. + +17 +00:00:59,000 --> 00:01:04,000 +So I can look at element through email again before using this name in my automation. + +18 +00:01:04,000 --> 00:01:06,000 +I just want to verify, is it correct or not? + +19 +00:01:07,000 --> 00:01:11,000 +It is locating unique element or not for that, I just go to. + +20 +00:01:14,000 --> 00:01:19,000 +Stadium, I'd previously we have used this and this time I want to use names, so I'm saying name is + +21 +00:01:19,000 --> 00:01:20,000 +equal to email. + +22 +00:01:21,000 --> 00:01:23,000 +Click on this file Typekit button. + +23 +00:01:24,000 --> 00:01:26,000 +So that element is highlighted, you can check it again. + +24 +00:01:27,000 --> 00:01:32,000 +This element is highlighted, if that is highlighted, means yes, we are able to look at that element + +25 +00:01:32,000 --> 00:01:35,000 +uniquely, OK. + +26 +00:01:35,000 --> 00:01:37,000 +Let me search any other element. + +27 +00:01:37,000 --> 00:01:40,000 +I'm just going to the password and trying to search this as well. + +28 +00:01:40,000 --> 00:01:42,000 +So here, maybe you could pass. + +29 +00:01:43,000 --> 00:01:45,000 +OK, let me try to look at this. + +30 +00:01:45,000 --> 00:01:54,000 +I'm saying name is equal to pass against search that is highlighted, so it is highlighting correct + +31 +00:01:54,000 --> 00:01:55,000 +element means. + +32 +00:01:55,000 --> 00:01:58,000 +Yes, we are able to look at this element uniquely. + +33 +00:01:59,000 --> 00:02:04,000 +But if you give any incorrect value like again, I'm going to pass it and that value does not exist, + +34 +00:02:04,000 --> 00:02:06,000 +so it will not highlight anything. + +35 +00:02:07,000 --> 00:02:09,000 +So it means this element is not correct. + +36 +00:02:10,000 --> 00:02:19,000 +OK, let me go to this dropdown and check it that if you check HTML here, name is equal to Byrdie underscore + +37 +00:02:19,000 --> 00:02:19,000 +month. + +38 +00:02:19,000 --> 00:02:24,000 +OK, let me try to look at this name is equal to this. + +39 +00:02:25,000 --> 00:02:32,000 +And so again, if you check that is highlighted, if it is highlighting means, yes, we are using Gutek + +40 +00:02:32,000 --> 00:02:34,000 +Element Locator. + +41 +00:02:36,000 --> 00:02:39,000 +So here we have seen how we can look at element through name. + +42 +00:02:41,000 --> 00:02:42,000 +That's all we have for the session. + +43 +00:02:42,000 --> 00:02:43,000 +Thanks for watching this video. + diff --git a/30 - Learn Element Locators/006 Locate or Search Element uniquely on Page using Element-Link text(inner text)_en.srt b/30 - Learn Element Locators/006 Locate or Search Element uniquely on Page using Element-Link text(inner text)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..3f20996c4cc10fc52bd33172f6fb5749d6669adf --- /dev/null +++ b/30 - Learn Element Locators/006 Locate or Search Element uniquely on Page using Element-Link text(inner text)_en.srt @@ -0,0 +1,184 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:05,000 +So previously, we have seen a few other locators. + +3 +00:00:06,000 --> 00:00:08,000 +Now I'm coming to one more locator. + +4 +00:00:08,000 --> 00:00:09,000 +We just link. + +5 +00:00:09,000 --> 00:00:11,000 +We can call it link text. + +6 +00:00:12,000 --> 00:00:19,000 +So this locator is going to work on link or you can call it hyperlinks and we can look element through + +7 +00:00:19,000 --> 00:00:20,000 +link text. + +8 +00:00:20,000 --> 00:00:21,000 +OK, let me show you. + +9 +00:00:22,000 --> 00:00:23,000 +I'm just moving the application. + +10 +00:00:23,000 --> 00:00:25,000 +If you check, we have many links over here. + +11 +00:00:26,000 --> 00:00:27,000 +When is this forgotten? + +12 +00:00:28,000 --> 00:00:29,000 +We can also click HYPERLINK. + +13 +00:00:30,000 --> 00:00:36,000 +Why do I need to provide my date of birth thumb's data policy cookie policy a page? + +14 +00:00:36,000 --> 00:00:37,000 +These all are linked. + +15 +00:00:38,000 --> 00:00:45,000 +We can look at these elements through its name and other locator, but we can also use link text. + +16 +00:00:46,000 --> 00:00:51,000 +But this link locator can work only on the hyperlinks. + +17 +00:00:51,000 --> 00:00:53,000 +So other look, it can work anywhere. + +18 +00:00:53,000 --> 00:00:57,000 +But this locator is going to work only on the links or we can click hyperlink. + +19 +00:00:57,000 --> 00:00:59,000 +OK, let me show you a picture of this. + +20 +00:01:00,000 --> 00:01:06,000 +First, if you're not confirm if the link or not, just go to the ex-chairman and check if that is started + +21 +00:01:06,000 --> 00:01:09,000 +with a means, yes, it's a link. + +22 +00:01:10,000 --> 00:01:18,000 +So if it is a link, we can pick text written on the link from Dewey or you can pick it from the stimulus + +23 +00:01:18,000 --> 00:01:18,000 +bill. + +24 +00:01:19,000 --> 00:01:23,000 +We can use this text to look at this element for locating it. + +25 +00:01:23,000 --> 00:01:27,000 +Again, I'm not going to use directly in my automation. + +26 +00:01:27,000 --> 00:01:31,000 +We need to verify first on the name I.D. So I'm here. + +27 +00:01:31,000 --> 00:01:35,000 +Honestly, no I.D. and missing link is equal to text. + +28 +00:01:35,000 --> 00:01:39,000 +If you find spaces, just remove the spaces from here. + +29 +00:01:39,000 --> 00:01:45,000 +So I'm saying, look at an element where the link text is forgotten. + +30 +00:01:45,000 --> 00:01:47,000 +Account just highlight. + +31 +00:01:47,000 --> 00:01:53,000 +So if you notice that element is highlighting again, that is highlighting. + +32 +00:01:53,000 --> 00:01:56,000 +So we are able to highlight a link to its text. + +33 +00:01:56,000 --> 00:01:59,000 +OK, in the same way, I need to work on this. + +34 +00:01:59,000 --> 00:02:01,000 +Why do I need to provide my date of birth? + +35 +00:02:01,000 --> 00:02:03,000 +So first of all, it's pick. + +36 +00:02:04,000 --> 00:02:05,000 +It's text. + +37 +00:02:05,000 --> 00:02:07,000 +Okay, I'll just go here. + +38 +00:02:11,000 --> 00:02:16,000 +And going to pick it if sticks, but something else is also copied, so I just need to pick. + +39 +00:02:19,000 --> 00:02:26,000 +Why do I need to provide my date of birth so you can pick text either from delay or from achievement? + +40 +00:02:26,000 --> 00:02:31,000 +OK, I'm just coming here and I'm seeing that stuff. + +41 +00:02:31,000 --> 00:02:36,000 +The that is the text of my link now highlight. + +42 +00:02:36,000 --> 00:02:44,000 +If you notice that element is highlighted so we can use link text to locate an element and look at the + +43 +00:02:44,000 --> 00:02:45,000 +name is Link. + +44 +00:02:47,000 --> 00:02:49,000 +So here we have seen how we can use link text. + +45 +00:02:50,000 --> 00:02:51,000 +That's all we hear. + +46 +00:02:52,000 --> 00:02:53,000 +Thanks for watching this video. + diff --git a/30 - Learn Element Locators/007 Locate or Search Element uniquely on the Page using Element-Class Name_en.srt b/30 - Learn Element Locators/007 Locate or Search Element uniquely on the Page using Element-Class Name_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..2d03c88c6b996dcbc9cad7c157f70c2807da8851 --- /dev/null +++ b/30 - Learn Element Locators/007 Locate or Search Element uniquely on the Page using Element-Class Name_en.srt @@ -0,0 +1,80 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +Previously, we have seen different locators now show you glass name, which is also an element locator. + +3 +00:00:09,000 --> 00:00:13,000 +So if you check in on many places, you will find a class. + +4 +00:00:14,000 --> 00:00:17,000 +We can use this class as element locator. + +5 +00:00:18,000 --> 00:00:25,000 +It is supported by almost all the tools which are supporting element locators so we can use glass as + +6 +00:00:25,000 --> 00:00:26,000 +an element locator. + +7 +00:00:26,000 --> 00:00:28,000 +OK, let me go to. + +8 +00:00:29,000 --> 00:00:36,000 +It's dismal, and if you check it, that is a still estimate of my username, their glasses in text. + +9 +00:00:37,000 --> 00:00:40,000 +Also, if you check password glasses in protest. + +10 +00:00:40,000 --> 00:00:46,000 +So when you are using any element locator which is matching with more than one element, it is going + +11 +00:00:46,000 --> 00:00:48,000 +to work on the first search element. + +12 +00:00:48,000 --> 00:00:51,000 +So if you use glass to locate any element, it will work with a username. + +13 +00:00:52,000 --> 00:00:59,000 +As of now, we cannot look at it through ID because I.D. highlight only if element is unique. + +14 +00:00:59,000 --> 00:01:05,000 +But in this case, if I write like input text, it is going to match with more than one element. + +15 +00:01:05,000 --> 00:01:10,000 +So it is not going to highlight anything but in real time when we are going for the automation, we + +16 +00:01:10,000 --> 00:01:12,000 +can use this locator. + +17 +00:01:13,000 --> 00:01:15,000 +So here we cannot verify this is correct or not. + +18 +00:01:15,000 --> 00:01:18,000 +We have to directly write in that automation script. + +19 +00:01:19,000 --> 00:01:20,000 +That's all. + +20 +00:01:20,000 --> 00:01:22,000 +We have tags watching this video. + diff --git a/30 - Learn Element Locators/008 Locate Element by CSS - Syntax 1 - using ID & Tag with ID_en.srt b/30 - Learn Element Locators/008 Locate Element by CSS - Syntax 1 - using ID & Tag with ID_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..b0d9e825be7ab49ee0e7beaf6e547b60f6479f07 --- /dev/null +++ b/30 - Learn Element Locators/008 Locate Element by CSS - Syntax 1 - using ID & Tag with ID_en.srt @@ -0,0 +1,212 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:08,000 +So in this session, I'm going to show you first and takes off see us this element locator. + +3 +00:00:09,000 --> 00:00:15,000 +So first of all, I'll show you how we can use I.D. for writing at this element locator. + +4 +00:00:16,000 --> 00:00:19,000 +I'm just going to move here, my application. + +5 +00:00:19,000 --> 00:00:21,000 +I'm taking example of the Facebook dot com. + +6 +00:00:22,000 --> 00:00:26,000 +Here we have email or phone number textbox, and I want to look at this. + +7 +00:00:26,000 --> 00:00:29,000 +So I just right click and going to the inspect. + +8 +00:00:29,000 --> 00:00:33,000 +First of all, will have to identify achievement of that element. + +9 +00:00:33,000 --> 00:00:35,000 +Okay, that is open here. + +10 +00:00:35,000 --> 00:00:42,000 +If you notice developers that ID is equal to email so we can use this ID for locating element throughout + +11 +00:00:42,000 --> 00:00:43,000 +cases. + +12 +00:00:44,000 --> 00:00:46,000 +So first, and that's what the thesis is. + +13 +00:00:46,000 --> 00:00:48,000 +We can use it. + +14 +00:00:48,000 --> 00:00:55,000 +But whenever we are writing courses with ID, we are writing like Hash Hashmi's the next data, I'm + +15 +00:00:55,000 --> 00:00:56,000 +writing ID. + +16 +00:00:57,000 --> 00:00:59,000 +So that's my thesis. + +17 +00:00:59,000 --> 00:01:02,000 +OK, let me show you, is it correct or not? + +18 +00:01:02,000 --> 00:01:09,000 +So I'm just coming to the browser and here I'm going for the assistant magical thesis. + +19 +00:01:10,000 --> 00:01:12,000 +Here I have pasted my data. + +20 +00:01:13,000 --> 00:01:18,000 +So if you check it here, it shows one matches means one match. + +21 +00:01:18,000 --> 00:01:21,000 +Just did it match with the one element. + +22 +00:01:21,000 --> 00:01:24,000 +Also, if you notice that element is highlighted. + +23 +00:01:25,000 --> 00:01:28,000 +So here we can identify the syntax we have written. + +24 +00:01:28,000 --> 00:01:29,000 +It's correct. + +25 +00:01:29,000 --> 00:01:36,000 +It is able to locate that element uniquely and same task if you want to do on five bonus. + +26 +00:01:37,000 --> 00:01:43,000 +I'm just moving here and I'm using see as this is equal to here and we have to write to see if this + +27 +00:01:43,000 --> 00:01:48,000 +is equal to because here all the look, it will be hitting the target. + +28 +00:01:48,000 --> 00:01:54,000 +But if you are using Chrome, we have to select like if you want to go for the SEISS or export. + +29 +00:01:55,000 --> 00:01:57,000 +No, I'm just going to highlight this. + +30 +00:01:57,000 --> 00:02:01,000 +So if you notice that element is going to be highlighted, okay, I'll just. + +31 +00:02:02,000 --> 00:02:03,000 +Click it again. + +32 +00:02:03,000 --> 00:02:04,000 +So that is highlighted. + +33 +00:02:05,000 --> 00:02:10,000 +OK, now if you notice we have seen fuzzy text in which we are writing I.D., we are using it. + +34 +00:02:10,000 --> 00:02:14,000 +But before writing the ID, we are using hash. + +35 +00:02:15,000 --> 00:02:21,000 +The second approach here in the text one where we can use beg with ID. + +36 +00:02:22,000 --> 00:02:25,000 +So if you notice in our HTML. + +37 +00:02:27,000 --> 00:02:28,000 +I just right click on this. + +38 +00:02:30,000 --> 00:02:36,000 +And my achievement having the tech input, so my biggest input and it is email. + +39 +00:02:37,000 --> 00:02:42,000 +So second syntax is big with 80, so taggers input. + +40 +00:02:42,000 --> 00:02:47,000 +And before writing the ID, we need to use hash and the ID is email. + +41 +00:02:47,000 --> 00:02:49,000 +Okay, let me show you, I'll just copy this. + +42 +00:02:50,000 --> 00:02:54,000 +I'm going to the browser and here I'm opening. + +43 +00:02:54,000 --> 00:02:59,000 +See assistant export checker Cece's selected just Tullett. + +44 +00:02:59,000 --> 00:03:04,000 +So that is highlighting OK, if I write anything incorrect, like if I miss this hash so it does not + +45 +00:03:04,000 --> 00:03:05,000 +look at anything. + +46 +00:03:06,000 --> 00:03:07,000 +But if you're writing the hash? + +47 +00:03:07,000 --> 00:03:09,000 +Yes, we are looking correct element. + +48 +00:03:10,000 --> 00:03:12,000 +Same if you want to check here. + +49 +00:03:13,000 --> 00:03:15,000 +I'm just moving too slowly. + +50 +00:03:15,000 --> 00:03:20,000 +My body and I'm writing CSX locator value is this highlight. + +51 +00:03:21,000 --> 00:03:22,000 +So if you notice that element is highlighted. + +52 +00:03:25,000 --> 00:03:30,000 +So we have seen first technique of the thesis element crater where we are using it, the idea of the + +53 +00:03:30,000 --> 00:03:34,000 +element, that's all we have tanks watching this video. + diff --git a/30 - Learn Element Locators/009 Locate Element by CSS - Syntax 2 - using Class Name & Tag with Class Name_en.srt b/30 - Learn Element Locators/009 Locate Element by CSS - Syntax 2 - using Class Name & Tag with Class Name_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..a7235f2d1c89676ae781b714c1c95a30230ced74 --- /dev/null +++ b/30 - Learn Element Locators/009 Locate Element by CSS - Syntax 2 - using Class Name & Tag with Class Name_en.srt @@ -0,0 +1,160 @@ +1 +00:00:00,000 --> 00:00:08,000 +Welcome to the testing world in this session, we are going to understand second takes off seizes element + +2 +00:00:08,000 --> 00:00:08,000 +locator. + +3 +00:00:09,000 --> 00:00:11,000 +And here we are going to use glass of the element. + +4 +00:00:11,000 --> 00:00:13,000 +OK, let me move to the browser. + +5 +00:00:15,000 --> 00:00:18,000 +And first of all, I'm just stretching all the extremely element. + +6 +00:00:19,000 --> 00:00:27,000 +So if you check it in, ex-chairman here, glass is input text and that is said by the developer so + +7 +00:00:27,000 --> 00:00:30,000 +we can use this glass to look at element two cases. + +8 +00:00:30,000 --> 00:00:32,000 +OK, just copy the class name. + +9 +00:00:33,000 --> 00:00:35,000 +I'm coming here and fuss syntax text. + +10 +00:00:36,000 --> 00:00:39,000 +And here we are going to write syntax by using glass. + +11 +00:00:39,000 --> 00:00:43,000 +So this is equal to whenever you are using glass beam. + +12 +00:00:44,000 --> 00:00:47,000 +It started with that dot dot. + +13 +00:00:47,000 --> 00:00:49,000 +And what are the class name you are giving? + +14 +00:00:49,000 --> 00:00:50,000 +So that is input text. + +15 +00:00:51,000 --> 00:00:56,000 +OK, I just copied this moving to see cis and export checker. + +16 +00:00:58,000 --> 00:00:58,000 +OK. + +17 +00:00:59,000 --> 00:01:02,000 +And I'm just selecting this link to right. + +18 +00:01:03,000 --> 00:01:11,000 +That is my element locator, but here if you notice it is matching, this locator is matching with the + +19 +00:01:12,000 --> 00:01:13,000 +eight elements. + +20 +00:01:14,000 --> 00:01:20,000 +So we're using glass, but it's going to match with the eight element if you use this element located + +21 +00:01:20,000 --> 00:01:22,000 +in automation, in our automation script. + +22 +00:01:22,000 --> 00:01:25,000 +So it could match more than one element and might be. + +23 +00:01:25,000 --> 00:01:28,000 +We are not able to perform task on a correct element. + +24 +00:01:29,000 --> 00:01:31,000 +So if you're using selenium, it always work on the first. + +25 +00:01:31,000 --> 00:01:35,000 +Such but different tools use different strategy. + +26 +00:01:36,000 --> 00:01:41,000 +So here, whenever whenever you create any element locator, it could be cases it could be a spot or + +27 +00:01:41,000 --> 00:01:42,000 +it could be anything else. + +28 +00:01:43,000 --> 00:01:48,000 +And if it is matching with more than one element, try to skip that locator and move to the next one. + +29 +00:01:48,000 --> 00:01:54,000 +But here I'm showing you the index so that it doesn't text where we are using Dot and that last name. + +30 +00:01:54,000 --> 00:01:58,000 +So that is a first index where we are writing cases by using glass. + +31 +00:01:59,000 --> 00:02:05,000 +OK, second syntax is we can use Bagani with glass. + +32 +00:02:05,000 --> 00:02:11,000 +So if you remember here, the technique was I'll just show you one more time. + +33 +00:02:12,000 --> 00:02:19,000 +He had the technical input I'm writing like input, dot, dot and offer the class name, class name + +34 +00:02:19,000 --> 00:02:20,000 +is this. + +35 +00:02:21,000 --> 00:02:30,000 +If I just copy it and try to search that element by using CSS as an expert checker again, you will + +36 +00:02:30,000 --> 00:02:34,000 +check it is matching with it match eight elements. + +37 +00:02:34,000 --> 00:02:40,000 +So these all eight elements are the type input and class is same, which is input text. + +38 +00:02:42,000 --> 00:02:49,000 +So here we have seen second technique of thesis element locator where we're using glass or glass name. + +39 +00:02:50,000 --> 00:02:50,000 +That's all. + +40 +00:02:50,000 --> 00:02:53,000 +We have tanks watching this video. + diff --git a/30 - Learn Element Locators/010 Locate Element by CSS - Syntax 3 - using any attribute & Tag with attribute_en.srt b/30 - Learn Element Locators/010 Locate Element by CSS - Syntax 3 - using any attribute & Tag with attribute_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..baff646aa06231a8e41637c0a6c8d78436a54ca1 --- /dev/null +++ b/30 - Learn Element Locators/010 Locate Element by CSS - Syntax 3 - using any attribute & Tag with attribute_en.srt @@ -0,0 +1,168 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:10,000 +So now I'm going to show you next syntax off CSIS Element Locator here, we're going to use any attribute + +3 +00:00:10,000 --> 00:00:11,000 +previously we have seen. + +4 +00:00:11,000 --> 00:00:12,000 +What do you mean by attribute? + +5 +00:00:13,000 --> 00:00:15,000 +I'm just coming to any element. + +6 +00:00:15,000 --> 00:00:20,000 +And just right click, I try to view achievement of that element. + +7 +00:00:20,000 --> 00:00:27,000 +And if you notice in this a.m. beggar's input and we have many attribute when this type, either one + +8 +00:00:27,000 --> 00:00:31,000 +is class name I.D. data to study. + +9 +00:00:32,000 --> 00:00:36,000 +So we have many attribute and this time I want to use attribute with the name type. + +10 +00:00:37,000 --> 00:00:42,000 +So whenever you want to use any attribute, the syntax is square bracket. + +11 +00:00:42,000 --> 00:00:44,000 +What are the name of the attributes? + +12 +00:00:44,000 --> 00:00:47,000 +So I'm going to use that attribute, which is type and the values emails I'm writing. + +13 +00:00:47,000 --> 00:00:51,000 +Lake type is equal to value. + +14 +00:00:52,000 --> 00:00:56,000 +Value is email, but it's always a good practice. + +15 +00:00:56,000 --> 00:01:01,000 +So whenever you're giving attribute value, it should be in the single code. + +16 +00:01:02,000 --> 00:01:05,000 +So if you have a space in the values, it will handle that. + +17 +00:01:06,000 --> 00:01:08,000 +So always a good practice to use single code. + +18 +00:01:09,000 --> 00:01:10,000 +So syntax is very simple. + +19 +00:01:10,000 --> 00:01:16,000 +The square récord attribute name and value is equal to value, and value is in the single code. + +20 +00:01:16,000 --> 00:01:18,000 +Okay, let me show you here. + +21 +00:01:18,000 --> 00:01:26,000 +I just copy this moving to the browser and I'm moving to the thesis assistant spot checker ceases and + +22 +00:01:26,000 --> 00:01:27,000 +that's the value. + +23 +00:01:27,000 --> 00:01:33,000 +So if you notice that is highlighted means yes, we are using Gutek Element Locator. + +24 +00:01:35,000 --> 00:01:42,000 +OK, now I'll show you the second syntax where we can use any attribute is tagged with any attribute. + +25 +00:01:42,000 --> 00:01:50,000 +So here, if I write like CIUSSS is equal to and the tag is if you check it, it will help you remember + +26 +00:01:50,000 --> 00:01:51,000 +it was input. + +27 +00:01:52,000 --> 00:01:52,000 +So input. + +28 +00:01:53,000 --> 00:01:59,000 +I'm just writing like tag with any attributes of PEG as input and any attribute it should be in the + +29 +00:01:59,000 --> 00:02:00,000 +square brackets. + +30 +00:02:01,000 --> 00:02:01,000 +OK. + +31 +00:02:01,000 --> 00:02:05,000 +This time, let me show you one more attribute, which is. + +32 +00:02:06,000 --> 00:02:06,000 +OK. + +33 +00:02:07,000 --> 00:02:12,000 +So this time we can use we can use any attribute, even if you notice the name, and it is also a attribute + +34 +00:02:13,000 --> 00:02:14,000 +so you can use it. + +35 +00:02:14,000 --> 00:02:18,000 +Like if I mentioned like it is equal to and the value is in the single course. + +36 +00:02:19,000 --> 00:02:24,000 +So that is my thesis syntax with attributes. + +37 +00:02:24,000 --> 00:02:30,000 +I'll just copy this moving here and use this expert checker. + +38 +00:02:32,000 --> 00:02:38,000 +Removing previous one, and that is so it is matching with exactly one element, means the Yes, doesn't + +39 +00:02:38,000 --> 00:02:39,000 +Texas. + +40 +00:02:39,000 --> 00:02:39,000 +Correct. + +41 +00:02:41,000 --> 00:02:45,000 +So here we have seen Syntax Tree in which we are using any attribute. + +42 +00:02:46,000 --> 00:02:49,000 +That's all we have for the session tanks watching this video. + diff --git a/30 - Learn Element Locators/011 Locate Element by CSS - Syntax 4 - using ID with attribute &Tag with ID & attrib_en.srt b/30 - Learn Element Locators/011 Locate Element by CSS - Syntax 4 - using ID with attribute &Tag with ID & attrib_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..35a25c6fb196e4d9f52f958c9cf799319b26523d --- /dev/null +++ b/30 - Learn Element Locators/011 Locate Element by CSS - Syntax 4 - using ID with attribute &Tag with ID & attrib_en.srt @@ -0,0 +1,152 @@ +1 +00:00:00,000 --> 00:00:08,000 +Welcome to the testing world in this session, I'll show you one more context in which which is a combination + +2 +00:00:08,000 --> 00:00:09,000 +of syntax one and syntax three. + +3 +00:00:10,000 --> 00:00:14,000 +So in context one we have seen we are using I.D. and Syntax Tree. + +4 +00:00:14,000 --> 00:00:17,000 +We have seen we are using attribute here. + +5 +00:00:17,000 --> 00:00:22,000 +We can combine them means I'm going to use I.D. with attribute with any other attribute. + +6 +00:00:23,000 --> 00:00:24,000 +So if you remember. + +7 +00:00:26,000 --> 00:00:29,000 +CCS is equal to and I'm just going to that put him in. + +8 +00:00:29,000 --> 00:00:34,000 +So this time I'm just going to look at password to I just right click on this inspect element. + +9 +00:00:35,000 --> 00:00:37,000 +OK, here if we check it. + +10 +00:00:37,000 --> 00:00:40,000 +So we are going to use it with any attributes of it. + +11 +00:00:40,000 --> 00:00:48,000 +Here is pass and any attributes I have to with the name type is equal to password. + +12 +00:00:48,000 --> 00:00:49,000 +So what I'm doing? + +13 +00:00:49,000 --> 00:00:51,000 +First of all, I'm writing ID. + +14 +00:00:52,000 --> 00:00:56,000 +So whenever you are writing ID like hash bars, that's my I.D.. + +15 +00:00:56,000 --> 00:00:59,000 +And before writing the I.D., we need two engine hash. + +16 +00:00:59,000 --> 00:01:02,000 +Then any attribute, any attribute should be in the square records. + +17 +00:01:03,000 --> 00:01:05,000 +So I just come here and I'm going to use Attribute, which is type. + +18 +00:01:06,000 --> 00:01:11,000 +So I just mention type and the value is in the single code. + +19 +00:01:11,000 --> 00:01:16,000 +So if we check that is a combination of first one and third one, in first we are writing it. + +20 +00:01:17,000 --> 00:01:21,000 +So whenever we are using only ID, we are writing the cache and the ID. + +21 +00:01:21,000 --> 00:01:25,000 +And then in third, we have seen parts and text. + +22 +00:01:25,000 --> 00:01:30,000 +We have seen any attribute, any attribute means in the square record attribute name and its value. + +23 +00:01:30,000 --> 00:01:32,000 +So that's my send off thesis. + +24 +00:01:32,000 --> 00:01:38,000 +I'll just copy this and let me move to see, is this an expert checker? + +25 +00:01:39,000 --> 00:01:41,000 +I'm just removing this one highlight. + +26 +00:01:42,000 --> 00:01:47,000 +So if you notice that element is highlighted and it is matching with exactly one element. + +27 +00:01:49,000 --> 00:01:54,000 +So here we have seen syntax in which we are using it with any attribute. + +28 +00:01:56,000 --> 00:02:03,000 +And the next one, as we can see here, bag with ID, with any attribute, so there we have seen first + +29 +00:02:03,000 --> 00:02:06,000 +we can write tech, which is important in our case. + +30 +00:02:06,000 --> 00:02:07,000 +So that is tagged with ID. + +31 +00:02:08,000 --> 00:02:11,000 +They hash I.D. and any attribute. + +32 +00:02:12,000 --> 00:02:14,000 +So that is another syntax which you can use. + +33 +00:02:14,000 --> 00:02:15,000 +I just copied this. + +34 +00:02:18,000 --> 00:02:23,000 +Going to the sea as an expert checker, that is so that is highlighted. + +35 +00:02:25,000 --> 00:02:32,000 +So that is beg with I.D. with any attribute, and it's a combination of sin tax, one plus and tree. + +36 +00:02:33,000 --> 00:02:35,000 +So here's a syntax for we. + +37 +00:02:35,000 --> 00:02:39,000 +We're realizing it with a tribute or bag with it. + +38 +00:02:39,000 --> 00:02:45,000 +And that any attribute that's all we have for the session tanks watching this, we do. + diff --git a/30 - Learn Element Locators/012 Locate Element by CSS - Syntax 5 - using Class & Attribute_en.srt b/30 - Learn Element Locators/012 Locate Element by CSS - Syntax 5 - using Class & Attribute_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..025e3c2d03b6490f87589db62177df79382d4d96 --- /dev/null +++ b/30 - Learn Element Locators/012 Locate Element by CSS - Syntax 5 - using Class & Attribute_en.srt @@ -0,0 +1,136 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +So now I'm going to send X Y off thesis element locator here. + +3 +00:00:08,000 --> 00:00:16,000 +We are going to combine syntax to incent extra incentive to help you remember we are using class and + +4 +00:00:16,000 --> 00:00:16,000 +syntax tree. + +5 +00:00:16,000 --> 00:00:18,000 +We're using any attribute. + +6 +00:00:18,000 --> 00:00:19,000 +So now we'll combined it. + +7 +00:00:20,000 --> 00:00:20,000 +Okay. + +8 +00:00:20,000 --> 00:00:28,000 +Let me move to the browser first, and I want to locate any element. + +9 +00:00:28,000 --> 00:00:29,000 +I want to look at this e-mail box. + +10 +00:00:29,000 --> 00:00:31,000 +Right click on Element Inspect. + +11 +00:00:32,000 --> 00:00:32,000 +OK. + +12 +00:00:32,000 --> 00:00:34,000 +If you notice here. + +13 +00:00:34,000 --> 00:00:38,000 +So we have we have a class input text. + +14 +00:00:38,000 --> 00:00:45,000 +So previously we have seen if you want to use only class, that's the syntax like dart class name and + +15 +00:00:45,000 --> 00:00:46,000 +then any attribute. + +16 +00:00:46,000 --> 00:00:49,000 +Any attribute means we are going to use in the squared record. + +17 +00:00:49,000 --> 00:00:52,000 +So here we have many attribute one attribute this type. + +18 +00:00:52,000 --> 00:00:57,000 +So I'm just using attribute type and the value isn't single course. + +19 +00:00:58,000 --> 00:01:01,000 +So that is the technique in which we are using class with any attribute. + +20 +00:01:02,000 --> 00:01:06,000 +OK, let me copy this moving to the browser. + +21 +00:01:08,000 --> 00:01:09,000 +Checking here. + +22 +00:01:09,000 --> 00:01:15,000 +So that shows it is not matching because one bracket was extra. + +23 +00:01:15,000 --> 00:01:17,000 +So now it is matching with the correct element. + +24 +00:01:18,000 --> 00:01:25,000 +So we have seen we can use glass with any attribute glass always whenever we are using glass dot. + +25 +00:01:25,000 --> 00:01:29,000 +And that last name and whatever the attribute, if you are using attribute, we just type. + +26 +00:01:31,000 --> 00:01:38,000 +And we know that next bag with glass, with any tribute sort of bag is in put in our case, you know, + +27 +00:01:38,000 --> 00:01:46,000 +we have seen that still many same day with a glass bag dot last name and any attribute attribute is + +28 +00:01:46,000 --> 00:01:47,000 +in the square brackets. + +29 +00:01:48,000 --> 00:01:53,000 +Just copy and let me move to the browser here. + +30 +00:01:55,000 --> 00:02:00,000 +It still does highlight it, but if you are giving an incorrect syntax, if you're doing any correction + +31 +00:02:00,000 --> 00:02:02,000 +text that is going to throw you error. + +32 +00:02:03,000 --> 00:02:09,000 +So here we have since indexed five, where we are using a combination of Index two and Index three. + +33 +00:02:10,000 --> 00:02:12,000 +That's all we have for the session. + +34 +00:02:12,000 --> 00:02:14,000 +Thanks watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/001 Locate Element by Xpath - Syntax 1 Use Single Attribute_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/001 Locate Element by Xpath - Syntax 1 Use Single Attribute_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..75868ea445de8838085fd0fe25304feecc3f78e4 --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/001 Locate Element by Xpath - Syntax 1 Use Single Attribute_en.srt @@ -0,0 +1,284 @@ +1 +00:00:00,000 --> 00:00:04,000 +Welcome to the testing world, no one works, we are going to go expert. + +2 +00:00:05,000 --> 00:00:10,000 +So before moving to the spot, the first of all, I just want to show you basics and pixel decks. + +3 +00:00:10,000 --> 00:00:15,000 +But so whenever you are writing export, it always starts with the double forward slash. + +4 +00:00:16,000 --> 00:00:21,000 +Now we are moving to fuss and Texas Tech spot in which we are going to use a single attribute. + +5 +00:00:22,000 --> 00:00:25,000 +Okay, let me move to the browser and here that's my application. + +6 +00:00:26,000 --> 00:00:28,000 +I'm going to show you a spot here on the Facebook. + +7 +00:00:28,000 --> 00:00:35,000 +Also on my application, which is that testing word or come forward testing, OK, I want to locate + +8 +00:00:35,000 --> 00:00:36,000 +this login button. + +9 +00:00:37,000 --> 00:00:42,000 +I just right click on this inspect as I click Inspect. + +10 +00:00:42,000 --> 00:00:49,000 +So we are going to get we have lot of attributes or tag name is input here, and we have a lot of attribute. + +11 +00:00:49,000 --> 00:00:52,000 +I'm going to use Attribute, which is value added. + +12 +00:00:52,000 --> 00:00:56,000 +The first index of the export is big name. + +13 +00:00:57,000 --> 00:01:02,000 +So here in our case, it is input, so it's always so export to start with the double forward slash + +14 +00:01:03,000 --> 00:01:06,000 +input and single attribute a single attribute. + +15 +00:01:06,000 --> 00:01:13,000 +Whenever we are adding attribute, it should be in the sky record and the attribute name is value and + +16 +00:01:13,000 --> 00:01:15,000 +it contains this log in. + +17 +00:01:16,000 --> 00:01:20,000 +Data of this value is log in whenever we are writing export. + +18 +00:01:21,000 --> 00:01:24,000 +And in that export whenever we are using attribute name. + +19 +00:01:25,000 --> 00:01:27,000 +So before that, we should write, edit it. + +20 +00:01:27,000 --> 00:01:32,000 +So that's the first index, which is tagged with a single attribute. + +21 +00:01:33,000 --> 00:01:37,000 +Here are tags input and the attribute was value. + +22 +00:01:37,000 --> 00:01:40,000 +And that's the data which is placed in front of the attribute. + +23 +00:01:40,000 --> 00:01:44,000 +Data is always in the single code attribute name. + +24 +00:01:44,000 --> 00:01:46,000 +Before that, it wouldn't even be able to edit it. + +25 +00:01:46,000 --> 00:01:50,000 +If we check it here, I'm going to use the attribute with the value I can use any attribute. + +26 +00:01:51,000 --> 00:01:52,000 +OK, I try to use one more attribute. + +27 +00:01:53,000 --> 00:01:53,000 +We just type. + +28 +00:01:54,000 --> 00:02:00,000 +So here I'm writing like type and value of the type is summat. + +29 +00:02:01,000 --> 00:02:10,000 +So if you notice here, Peg is input attribute I'm using, which is type and value of the attribute + +30 +00:02:10,000 --> 00:02:10,000 +in the single code. + +31 +00:02:11,000 --> 00:02:16,000 +Before that, you would name it should be at the rate so that the first index of export. + +32 +00:02:16,000 --> 00:02:19,000 +OK, let me copy moving to the browser. + +33 +00:02:20,000 --> 00:02:24,000 +I'm just opening C Is this an export checker? + +34 +00:02:24,000 --> 00:02:29,000 +And this time I'm using export to, as I enter it, just one match. + +35 +00:02:29,000 --> 00:02:30,000 +OK. + +36 +00:02:30,000 --> 00:02:34,000 +You're not able to see that because it is coming over to log in button. + +37 +00:02:34,000 --> 00:02:36,000 +So I'll just remove this. + +38 +00:02:36,000 --> 00:02:39,000 +And if rejected, that element is highlighted. + +39 +00:02:41,000 --> 00:02:47,000 +So, Foster, ticks of the export is tagged with the single attribute, we can use any attribute that + +40 +00:02:47,000 --> 00:02:47,000 +we have seen. + +41 +00:02:48,000 --> 00:02:49,000 +We are using single attribute. + +42 +00:02:49,000 --> 00:02:55,000 +We can use any attribute that we have seen, but always check the attribute, which looks static. + +43 +00:02:55,000 --> 00:02:57,000 +Okay, let me show you what does it mean? + +44 +00:02:58,000 --> 00:02:59,000 +I'm just coming to the demo. + +45 +00:03:00,000 --> 00:03:07,000 +Here we have many attributes like value area label data to study type ID. + +46 +00:03:07,000 --> 00:03:14,000 +If we notice here I.D. value, you underscore zero underscore two that does not seem to be meaningful. + +47 +00:03:15,000 --> 00:03:17,000 +The kind of values are dynamic. + +48 +00:03:17,000 --> 00:03:19,000 +It's going to be change very frequently. + +49 +00:03:19,000 --> 00:03:26,000 +So always, whenever you are taking attribute, just make sure the value should be static, as every + +50 +00:03:26,000 --> 00:03:30,000 +time the page will load, a new value will be placed here. + +51 +00:03:30,000 --> 00:03:32,000 +You will have to update your spot again and again. + +52 +00:03:32,000 --> 00:03:40,000 +We don't use that kind of dynamic attributes in the same way if you check it style background RGV This + +53 +00:03:40,000 --> 00:03:46,000 +border value and the column could change very frequently, so we are not using that kind of attributes. + +54 +00:03:48,000 --> 00:03:50,000 +Let me show you the same on my application. + +55 +00:03:50,000 --> 00:03:53,000 +I want to work on this, my username textbox. + +56 +00:03:54,000 --> 00:03:59,000 +So let me highlight that all of this here, that is input. + +57 +00:04:00,000 --> 00:04:04,000 +And we have many attributes like class name, required, type, placeholder. + +58 +00:04:05,000 --> 00:04:11,000 +If you know or this class here we have many elements and the classes seem so if if you are using class + +59 +00:04:11,000 --> 00:04:14,000 +as attribute, it is going to look at multiple elements. + +60 +00:04:14,000 --> 00:04:17,000 +We try to use any attribute which seems to be static. + +61 +00:04:18,000 --> 00:04:22,000 +So if we check it, name a fully underscore user name that seems to be static. + +62 +00:04:22,000 --> 00:04:31,000 +Okay, let me copy this and I'm writing export like input and we are using it attribute with the name. + +63 +00:04:32,000 --> 00:04:37,000 +We just name a key edit it name because before that we would be using edit. + +64 +00:04:37,000 --> 00:04:40,000 +It is equal to and whatever the value. + +65 +00:04:41,000 --> 00:04:42,000 +So that's my export. + +66 +00:04:42,000 --> 00:04:46,000 +Okay, let me copy this and show you here on the browser. + +67 +00:04:46,000 --> 00:04:47,000 +I'm just closing it. + +68 +00:04:47,000 --> 00:04:49,000 +See it as an export checker. + +69 +00:04:51,000 --> 00:04:56,000 +Much so, if you check it, it is meeting with the exactly one element which is highlighted. + +70 +00:04:58,000 --> 00:05:03,000 +So here we have seen fuss and pics of the spot where we are using single attribute. + +71 +00:05:04,000 --> 00:05:07,000 +That's all we have for the session tanks watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/002 Locate Element by Xpath - Syntax 2 Use Multiple Attributes with OR condition_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/002 Locate Element by Xpath - Syntax 2 Use Multiple Attributes with OR condition_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..f38dab81499bbb3be65d33016671ddd75262fa4f --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/002 Locate Element by Xpath - Syntax 2 Use Multiple Attributes with OR condition_en.srt @@ -0,0 +1,304 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:09,000 +So in this session, I'll show you second syntax in which we are going to use multiple attribute with + +3 +00:00:09,000 --> 00:00:10,000 +or condition. + +4 +00:00:10,000 --> 00:00:13,000 +So previously we have seen we are using one attribute. + +5 +00:00:13,000 --> 00:00:16,000 +But now I'll show you multiple attribute with or condition. + +6 +00:00:17,000 --> 00:00:28,000 +OK, now if I move here on my application and yeah, and I want to work on this, firstly, OK, I'll + +7 +00:00:28,000 --> 00:00:31,000 +just right click on this and inspect element. + +8 +00:00:32,000 --> 00:00:36,000 +So here my bag is input, and we have many attributes like type. + +9 +00:00:37,000 --> 00:00:47,000 +Class the rest I.D. They rape me in any adequate place holder, area level I.D. So we have many attributes. + +10 +00:00:48,000 --> 00:00:49,000 +OK, what I want to see. + +11 +00:00:49,000 --> 00:00:56,000 +I want to look at an element where either name is equal to first name or area label is a first name. + +12 +00:00:57,000 --> 00:01:03,000 +So the point is here we are going to give multiple attribute and we won't if any of that dispute is + +13 +00:01:03,000 --> 00:01:03,000 +going to match. + +14 +00:01:04,000 --> 00:01:04,000 +It should work. + +15 +00:01:05,000 --> 00:01:06,000 +Okay, let me show you. + +16 +00:01:06,000 --> 00:01:12,000 +So again, whenever we are writing what started with the double forward slash tag here, the tag is + +17 +00:01:12,000 --> 00:01:12,000 +input. + +18 +00:01:12,000 --> 00:01:16,000 +So I mention input in the square bracket. + +19 +00:01:16,000 --> 00:01:18,000 +We can give many attribute multiple attributes. + +20 +00:01:18,000 --> 00:01:20,000 +The first attribute his name. + +21 +00:01:21,000 --> 00:01:23,000 +I use this enter it name. + +22 +00:01:23,000 --> 00:01:28,000 +We know that before the attribute name we need to mention, added value is in the single code. + +23 +00:01:28,000 --> 00:01:34,000 +That's first then or and I'm going to the Security Bureau, which is area labeled. + +24 +00:01:34,000 --> 00:01:38,000 +Okay, I see area label. + +25 +00:01:38,000 --> 00:01:41,000 +And before the attribute name, I'm just using ED. + +26 +00:01:41,000 --> 00:01:47,000 +So now we are using to attribute separated by or or means either value should match. + +27 +00:01:47,000 --> 00:01:57,000 +I can let me copy this morning to the browser, see this expert checker and just paste here. + +28 +00:01:57,000 --> 00:02:01,000 +So element is highlighted only one match. + +29 +00:02:01,000 --> 00:02:02,000 +Is there a okay what I do? + +30 +00:02:03,000 --> 00:02:04,000 +I just change the second value. + +31 +00:02:04,000 --> 00:02:07,000 +I just make the same mistake in the second value. + +32 +00:02:08,000 --> 00:02:15,000 +Still, you will notice it is highlighting that element because that element is match to the first attribute + +33 +00:02:15,000 --> 00:02:19,000 +and we are using or or means either one should match in the same way. + +34 +00:02:19,000 --> 00:02:27,000 +If I set incorrect value in the name means as the first attribute, it is still it is highlighting because + +35 +00:02:27,000 --> 00:02:29,000 +second attribute is matching. + +36 +00:02:30,000 --> 00:02:33,000 +No, if both attribute values are not correct. + +37 +00:02:33,000 --> 00:02:34,000 +It is not going to highlight it. + +38 +00:02:35,000 --> 00:02:42,000 +So we have seen how we can use multiple attributes with or one more thing that we need to notice this + +39 +00:02:42,000 --> 00:02:44,000 +or excuses to. + +40 +00:02:44,000 --> 00:02:46,000 +So that should be the small. + +41 +00:02:46,000 --> 00:02:53,000 +Or if you are using capital or if you are using all capital, it is not going to work. + +42 +00:02:53,000 --> 00:02:54,000 +So that is case sensitive. + +43 +00:02:56,000 --> 00:03:02,000 +So here in this technique, we have seen multiple attributes with or as of now, we have used only two + +44 +00:03:02,000 --> 00:03:03,000 +attributes. + +45 +00:03:03,000 --> 00:03:05,000 +You can use any number of attributes. + +46 +00:03:05,000 --> 00:03:11,000 +So let me move to my application and I want to work on this dropdown. + +47 +00:03:12,000 --> 00:03:14,000 +Let me check it to DML. + +48 +00:03:15,000 --> 00:03:19,000 +OK, if we check it here, we have only one attribute. + +49 +00:03:19,000 --> 00:03:20,000 +OK, let me go to the country. + +50 +00:03:22,000 --> 00:03:23,000 +I want to use multiple attribute. + +51 +00:03:24,000 --> 00:03:24,000 +OK. + +52 +00:03:24,000 --> 00:03:28,000 +If you notice we have here in the country, we have name, we have class. + +53 +00:03:29,000 --> 00:03:31,000 +So I want to use name in class. + +54 +00:03:31,000 --> 00:03:31,000 +OK. + +55 +00:03:32,000 --> 00:03:34,000 +So and that's a tag is select. + +56 +00:03:34,000 --> 00:03:37,000 +So let me write like select. + +57 +00:03:37,000 --> 00:03:38,000 +That's my tag. + +58 +00:03:40,000 --> 00:03:42,000 +And we have for each attribute, which is name. + +59 +00:03:43,000 --> 00:03:44,000 +So let me copy this. + +60 +00:03:47,000 --> 00:03:52,000 +Adelaide name is equal to value and the value should be in the single court. + +61 +00:03:52,000 --> 00:03:54,000 +Even you can mention in the double courts. + +62 +00:03:54,000 --> 00:03:59,000 +But when we are going to take it to the automation and and you're using it in the Jawa, so whenever + +63 +00:03:59,000 --> 00:04:03,000 +we are taking it to the Java in Java string is in the double quotes. + +64 +00:04:04,000 --> 00:04:06,000 +So here it could create problems. + +65 +00:04:06,000 --> 00:04:08,000 +So we are always using the single codes. + +66 +00:04:08,000 --> 00:04:14,000 +But even if you write it in the court as of now, it will work in the same way I'm just mentioned or + +67 +00:04:15,000 --> 00:04:18,000 +and I'm saying glass is equal to. + +68 +00:04:20,000 --> 00:04:23,000 +So Glass is equal to whatever the value. + +69 +00:04:24,000 --> 00:04:26,000 +I'll just copy this. + +70 +00:04:26,000 --> 00:04:29,000 +Take it to the browser again. + +71 +00:04:29,000 --> 00:04:30,000 +See, this is an expert checker. + +72 +00:04:33,000 --> 00:04:41,000 +Experts should be selected here, and that element is highlighted so we can use any number of attributes + +73 +00:04:41,000 --> 00:04:41,000 +here. + +74 +00:04:42,000 --> 00:04:46,000 +Here we are using or means if any of the attribute is going to match, it will work. + +75 +00:04:48,000 --> 00:04:50,000 +That's all we have for the session. + +76 +00:04:50,000 --> 00:04:51,000 +Thanks for watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/003 Locate Element by Xpath - Syntax 3 Use Multiple Attributes with AND condition_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/003 Locate Element by Xpath - Syntax 3 Use Multiple Attributes with AND condition_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..71bfcb6b9d15dd55ccb50e9856608840c3df66c6 --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/003 Locate Element by Xpath - Syntax 3 Use Multiple Attributes with AND condition_en.srt @@ -0,0 +1,124 @@ +1 +00:00:00,000 --> 00:00:07,000 +Welcome to the wrestling world in this session, I'm going to show you how we can write Exparte using + +2 +00:00:07,000 --> 00:00:14,000 +multiple attributes, but this time we are going to use and and there is a logical and means if I want + +3 +00:00:14,000 --> 00:00:19,000 +all the attributes, well, you must match in that case we can use. + +4 +00:00:19,000 --> 00:00:23,000 +And let me show you, I'm just moving to the browser. + +5 +00:00:23,000 --> 00:00:24,000 +Moving to the Facebook. + +6 +00:00:24,000 --> 00:00:29,000 +I want to work on this data, but I'll just right click and find out the estimate of that. + +7 +00:00:29,000 --> 00:00:38,000 +So here, if I check, we have a name, we ID, we have title, we have we many attribute and the peg + +8 +00:00:38,000 --> 00:00:39,000 +is select. + +9 +00:00:40,000 --> 00:00:45,000 +So let me write an export and whenever we are writing X, but always double forward slash. + +10 +00:00:45,000 --> 00:00:47,000 +So Tag is select. + +11 +00:00:47,000 --> 00:00:51,000 +So I mention I mentioned Lake Select and I'm going to use multiple attributes. + +12 +00:00:52,000 --> 00:00:59,000 +So if in any case you find you are finding any attribute which is common between the multiple elements + +13 +00:00:59,000 --> 00:01:05,000 +so we can use multiple attributes like if we are not able to locate any element at the single attribute, + +14 +00:01:05,000 --> 00:01:08,000 +then try to go for the combination of multiple attributes. + +15 +00:01:08,000 --> 00:01:12,000 +So I'm saying, OK, here and what I want to use name. + +16 +00:01:12,000 --> 00:01:16,000 +So I'm saying first attribute is name and the values this. + +17 +00:01:17,000 --> 00:01:21,000 +And then I'm writing the second attribute, which is title. + +18 +00:01:22,000 --> 00:01:23,000 +A title is equal to the. + +19 +00:01:24,000 --> 00:01:29,000 +So I'm saying the title is equal to values in that single course. + +20 +00:01:29,000 --> 00:01:33,000 +So all attribute name started to enter it. + +21 +00:01:35,000 --> 00:01:36,000 +Not X by this, really. + +22 +00:01:36,000 --> 00:01:39,000 +I just copy this moving to browser. + +23 +00:01:40,000 --> 00:01:48,000 +See this exploit checker removing the previous expert and now a future element is highlighted. + +24 +00:01:50,000 --> 00:01:52,000 +So means yes, we are using correct element locator. + +25 +00:01:52,000 --> 00:01:53,000 +But this time we are using. + +26 +00:01:53,000 --> 00:02:00,000 +And so if any of the attribute value goes wrong, it will not highlight. + +27 +00:02:00,000 --> 00:02:03,000 +That element means it is not going to locate that element. + +28 +00:02:04,000 --> 00:02:08,000 +So here we have seen how we can locate by using and. + +29 +00:02:09,000 --> 00:02:13,000 +Logical operator, so we are using multiple attribute with and condition. + +30 +00:02:15,000 --> 00:02:16,000 +That's all we have for the session. + +31 +00:02:17,000 --> 00:02:18,000 +Thanks for watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/004 Locate Element by Xpath - Syntax 4 Use on place Attributes_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/004 Locate Element by Xpath - Syntax 4 Use on place Attributes_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..97af1321d6d7c87371bff00737bcebb14db463aa --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/004 Locate Element by Xpath - Syntax 4 Use on place Attributes_en.srt @@ -0,0 +1,176 @@ +1 +00:00:00,000 --> 00:00:05,000 +Welcome to the wrestling world in this session, we are going to use one more syntax. + +2 +00:00:06,000 --> 00:00:12,000 +And here we are going to use export that we have written previously, but now we'll update it by using + +3 +00:00:12,000 --> 00:00:13,000 +Star. + +4 +00:00:14,000 --> 00:00:19,000 +So we have the two option we can use either star on the place of attribute name or on the place of big + +5 +00:00:19,000 --> 00:00:19,000 +name. + +6 +00:00:19,000 --> 00:00:20,000 +OK, what does it mean? + +7 +00:00:21,000 --> 00:00:23,000 +Let me show you, I'm just moving to the browser. + +8 +00:00:24,000 --> 00:00:28,000 +And previously we have written the textbook here and the spot. + +9 +00:00:28,000 --> 00:00:30,000 +We have two attributes. + +10 +00:00:30,000 --> 00:00:33,000 +One is name and other one this title. + +11 +00:00:34,000 --> 00:00:39,000 +So we have the option on the place of any attribute name we can use star. + +12 +00:00:39,000 --> 00:00:40,000 +What does it mean? + +13 +00:00:41,000 --> 00:00:44,000 +It means I'm searching for any element on the page. + +14 +00:00:44,000 --> 00:00:50,000 +We are beggar's select and any attribute value is this. + +15 +00:00:51,000 --> 00:00:55,000 +And the second attribute is this even you can use star on the place of both attribute name. + +16 +00:00:55,000 --> 00:00:56,000 +What I'm using here. + +17 +00:00:57,000 --> 00:01:01,000 +First big name should be this, and for any attribute, value should be this. + +18 +00:01:01,000 --> 00:01:03,000 +And for second attribute really should be this. + +19 +00:01:04,000 --> 00:01:05,000 +So we are not giving the attribute name. + +20 +00:01:06,000 --> 00:01:11,000 +We are seeing element should be of select type, but attribute name could be anything really should + +21 +00:01:11,000 --> 00:01:11,000 +be this. + +22 +00:01:13,000 --> 00:01:15,000 +So we can use star on the place of attribute name. + +23 +00:01:17,000 --> 00:01:21,000 +Also, in the same way we had the option to use Star on the place of tag name. + +24 +00:01:22,000 --> 00:01:24,000 +So if you want, I'll just move here. + +25 +00:01:26,000 --> 00:01:29,000 +We can use Star on the place of tag name as well. + +26 +00:01:29,000 --> 00:01:32,000 +So what we are seeing search any element on the page. + +27 +00:01:33,000 --> 00:01:38,000 +We're fuzzy attribute value is this attribute name could be anything. + +28 +00:01:38,000 --> 00:01:39,000 +And second values. + +29 +00:01:39,000 --> 00:01:43,000 +This again, let me show you another example here. + +30 +00:01:44,000 --> 00:01:52,000 +I'm coming to element username and I'm writing spot for this where we we're using tag, which is input + +31 +00:01:52,000 --> 00:01:54,000 +and type is equal to email. + +32 +00:01:54,000 --> 00:01:56,000 +Okay, let me write this spot here. + +33 +00:01:56,000 --> 00:02:00,000 +First, I'm seeing input. + +34 +00:02:01,000 --> 00:02:07,000 +We're type is equal to image, so that makes. + +35 +00:02:07,000 --> 00:02:11,000 +But it is locating one element exec, one element. + +36 +00:02:11,000 --> 00:02:15,000 +So as I told you, we can use star on the place of attribute name. + +37 +00:02:16,000 --> 00:02:21,000 +So here if you're using star on the place of attribute name, still it is matching with one element. + +38 +00:02:22,000 --> 00:02:27,000 +No second is we can install it on the place of big name if we use a star on the place of big name. + +39 +00:02:27,000 --> 00:02:34,000 +You will notice start matching with the two elements so we can use it, but we need to be careful that + +40 +00:02:34,000 --> 00:02:40,000 +X spot that we are adding it should be unique because I want to locate element uniquely so that I can + +41 +00:02:40,000 --> 00:02:47,000 +work on it so we can use Star on the place of attribute name or tag name that is allowed here and X. + +42 +00:02:47,000 --> 00:02:55,000 +But so we have seen syntax where we are using star on the place of attribute name and tag name. + +43 +00:02:56,000 --> 00:02:57,000 +That's all we have for the session. + +44 +00:02:58,000 --> 00:02:59,000 +Parents watching the street you. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/005 Locate Element by Xpath - Syntax 5 Use Innertext of Element_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/005 Locate Element by Xpath - Syntax 5 Use Innertext of Element_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..449e4a7b17866b0790e7ad1f13a3a10fdaec966e --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/005 Locate Element by Xpath - Syntax 5 Use Innertext of Element_en.srt @@ -0,0 +1,144 @@ +1 +00:00:00,000 --> 00:00:07,000 +Welcome to the testing world in this session, I'll show you next in Texas, where we are going to write + +2 +00:00:07,000 --> 00:00:09,000 +export using inner text. + +3 +00:00:10,000 --> 00:00:16,000 +Previously, we have seen what do you mean by the inner text, a given element where we are not having + +4 +00:00:16,000 --> 00:00:20,000 +any attribute or attributes are having dynamic values. + +5 +00:00:21,000 --> 00:00:25,000 +So in that case, you can go and check inner text as well. + +6 +00:00:25,000 --> 00:00:26,000 +Okay, let me show you an example. + +7 +00:00:27,000 --> 00:00:30,000 +I'm just moving here on the browser and I want to look at this. + +8 +00:00:30,000 --> 00:00:33,000 +Create a new account for that. + +9 +00:00:33,000 --> 00:00:34,000 +I just right click Inspect. + +10 +00:00:36,000 --> 00:00:38,000 +So if you check it, that is it. + +11 +00:00:38,000 --> 00:00:44,000 +There's a div means the tag is div, but if you check it, we have only one attribute, which is glass, + +12 +00:00:45,000 --> 00:00:48,000 +which could be common between the multiple element that is one. + +13 +00:00:48,000 --> 00:00:52,000 +Also, if you check, the value of the glass seems to be dynamic. + +14 +00:00:53,000 --> 00:01:00,000 +So I'm not going to use this attribute, you know, in this case, if you notice we have inner text + +15 +00:01:00,000 --> 00:01:07,000 +so we can locate an element by using it in our text, and I just copied outright swap using inner text. + +16 +00:01:07,000 --> 00:01:13,000 +And this time I'm going to use exact text means we are going to use complete text complete in our text. + +17 +00:01:13,000 --> 00:01:16,000 +I just copy this double forward slash. + +18 +00:01:16,000 --> 00:01:25,000 +And if you notice the tag is div, some writing do here square record text is equal to value. + +19 +00:01:26,000 --> 00:01:34,000 +Now the point is before the sticks do I need to use a straight answer is no way because after it is + +20 +00:01:34,000 --> 00:01:39,000 +used, when we are writing attributes and that is not a attribute. + +21 +00:01:39,000 --> 00:01:44,000 +So whenever you are using in our text, use brackets in front of text. + +22 +00:01:45,000 --> 00:01:52,000 +So note that that export, which is is really that the next export is ready, which is using inert text. + +23 +00:01:53,000 --> 00:02:02,000 +Let me copy this and just moving to browser thesis and export checker, and if you notice that is highlighted, + +24 +00:02:02,000 --> 00:02:06,000 +means yes, we are using the correct element locator. + +25 +00:02:07,000 --> 00:02:12,000 +So now by this way, we can look at any element if I take an example there to clear the page. + +26 +00:02:12,000 --> 00:02:12,000 +OK. + +27 +00:02:12,000 --> 00:02:14,000 +If I take it here. + +28 +00:02:16,000 --> 00:02:19,000 +That's a link where we have actually left. + +29 +00:02:19,000 --> 00:02:25,000 +And again, this really could be dynamic, I want to use in a text, so I'm just writing like a which + +30 +00:02:25,000 --> 00:02:31,000 +is the tag here and my inner text is text, and that's a value. + +31 +00:02:33,000 --> 00:02:37,000 +I just copied this more into the browser. + +32 +00:02:38,000 --> 00:02:42,000 +See it, says expert chicken removing the previous spot and this. + +33 +00:02:43,000 --> 00:02:49,000 +So if you notice that is highlighted so we can use in our text of the element to look at element uniquely. + +34 +00:02:49,000 --> 00:02:54,000 +As of now, we're using complete text means exact text in NICKSON text. + +35 +00:02:54,000 --> 00:03:00,000 +I'll show you how we can use partial text, so that's all we have for the session here we have seen + +36 +00:03:01,000 --> 00:03:02,000 +send text by using inner text. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/006 Locate Element by Xpath - Syntax 6 Use Partial Innertext of Element_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/006 Locate Element by Xpath - Syntax 6 Use Partial Innertext of Element_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..2e562daaa9718a18e558aa6c64a339d9ac3f2a7e --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/006 Locate Element by Xpath - Syntax 6 Use Partial Innertext of Element_en.srt @@ -0,0 +1,156 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +So previously, we have seen how we can locate an element by using inner text, but previously we're + +3 +00:00:08,000 --> 00:00:13,000 +using complete inner text knowledge or you how we can use partial inner text. + +4 +00:00:13,000 --> 00:00:15,000 +Okay, let me move to the browser. + +5 +00:00:15,000 --> 00:00:18,000 +And previously we have located this create a new account. + +6 +00:00:19,000 --> 00:00:21,000 +Okay, let me go to the table. + +7 +00:00:22,000 --> 00:00:24,000 +That's a div where text is this. + +8 +00:00:25,000 --> 00:00:36,000 +So previously our export was div, where text and is equal to value, and we are using brackets in front + +9 +00:00:36,000 --> 00:00:37,000 +of the text we are not using. + +10 +00:00:37,000 --> 00:00:40,000 +Edit it, you know, it might be possible. + +11 +00:00:41,000 --> 00:00:45,000 +As of now, we have the text create a new account and it's a dynamic text. + +12 +00:00:45,000 --> 00:00:49,000 +Tomorrow, when we open the application, we are getting open in new account. + +13 +00:00:50,000 --> 00:00:52,000 +Next day we open the application. + +14 +00:00:52,000 --> 00:00:53,000 +We are getting started. + +15 +00:00:53,000 --> 00:00:57,000 +New account means some part of the text is dynamic. + +16 +00:00:58,000 --> 00:01:04,000 +So in that kind of scenario, when you have dynamic text and you want to locate that particular element + +17 +00:01:04,000 --> 00:01:09,000 +by using only partial text so you can keep here only the text, which is static. + +18 +00:01:09,000 --> 00:01:14,000 +So I'm thinking example we have new account, which is this text is static. + +19 +00:01:15,000 --> 00:01:18,000 +In that case, can we match equal to entries? + +20 +00:01:18,000 --> 00:01:21,000 +No, because we are not checking exact text. + +21 +00:01:21,000 --> 00:01:25,000 +We are checking partial text on the place of equal to use comma. + +22 +00:01:27,000 --> 00:01:34,000 +No, this text and its value put into the brackets and before that use contains. + +23 +00:01:35,000 --> 00:01:38,000 +Something this tech should convince this. + +24 +00:01:39,000 --> 00:01:42,000 +OK, let's understand this and text one more time. + +25 +00:01:43,000 --> 00:01:49,000 +So our initial text was this I'm just keeping the text, which is static, always static here. + +26 +00:01:50,000 --> 00:01:52,000 +We cannot use equal to I'm just using comma. + +27 +00:01:53,000 --> 00:01:56,000 +This text and its value is in the brackets. + +28 +00:01:57,000 --> 00:02:00,000 +And now before that, we are using contents. + +29 +00:02:03,000 --> 00:02:04,000 +Now, just copied this. + +30 +00:02:04,000 --> 00:02:06,000 +Let me show you on the browser. + +31 +00:02:06,000 --> 00:02:08,000 +So moving to the thesis, an expert checker. + +32 +00:02:11,000 --> 00:02:14,000 +This, if you get that element is highlighted. + +33 +00:02:14,000 --> 00:02:19,000 +Means, yes, we are able to look at that element by using only partial text. + +34 +00:02:21,000 --> 00:02:26,000 +So that's going to be used very frequently, because in many cases, you would find out the text we + +35 +00:02:26,000 --> 00:02:29,000 +are using or in our text we are using, that is dynamic. + +36 +00:02:30,000 --> 00:02:33,000 +But if it is, if it is partially dynamic, then we can use this approach. + +37 +00:02:33,000 --> 00:02:37,000 +If it is complete dynamic, we are going to use next approaches. + +38 +00:02:37,000 --> 00:02:43,000 +But as of now, we have seen if you have a text which is partially dynamic, we can use this approach. + +39 +00:02:44,000 --> 00:02:47,000 +There's all we have for the session tanks watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/007 Locate Element by Xpath - Syntax 7 Use Partial Attribute of Element_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/007 Locate Element by Xpath - Syntax 7 Use Partial Attribute of Element_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..566000451063ecc4c197eddedf1f19165e1f3268 --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/007 Locate Element by Xpath - Syntax 7 Use Partial Attribute of Element_en.srt @@ -0,0 +1,144 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +And this session, I'll show you how we can use partial value of that tribute. + +3 +00:00:08,000 --> 00:00:12,000 +So previously we have seen how we can write export using attributes. + +4 +00:00:13,000 --> 00:00:17,000 +Let me move to the browser and I'm saying I want to locate this password box. + +5 +00:00:18,000 --> 00:00:21,000 +OK, I just got that demo of it. + +6 +00:00:22,000 --> 00:00:25,000 +And here export is input. + +7 +00:00:25,000 --> 00:00:30,000 +My take is input and I'm going to use type, but just password. + +8 +00:00:30,000 --> 00:00:38,000 +So I'm saying, OK, my type is password, so I'm writing type is equal to password, so that is going + +9 +00:00:38,000 --> 00:00:40,000 +to work as of now. + +10 +00:00:40,000 --> 00:00:44,000 +I'll just copy this and let's check here, and it should highlight that element. + +11 +00:00:44,000 --> 00:00:44,000 +OK? + +12 +00:00:44,000 --> 00:00:46,000 +It is highlighting you two elements. + +13 +00:00:47,000 --> 00:00:48,000 +Because as of note, matching with the two. + +14 +00:00:49,000 --> 00:00:56,000 +But OK, now I see this type is going to be changed very frequently. + +15 +00:00:56,000 --> 00:00:59,000 +This password is not a static text. + +16 +00:00:59,000 --> 00:01:05,000 +As of now in this, let me show you in that html, as of note, type Typekit set password. + +17 +00:01:06,000 --> 00:01:11,000 +But I take an example like this not a static dynamic today is mentioned password. + +18 +00:01:12,000 --> 00:01:14,000 +Tomorrow, if we check it, it is mentioned only pass. + +19 +00:01:15,000 --> 00:01:17,000 +And today it's a parsed W-2. + +20 +00:01:17,000 --> 00:01:20,000 +I'm taking example where it is not static. + +21 +00:01:20,000 --> 00:01:22,000 +It's going to be dynamic. + +22 +00:01:22,000 --> 00:01:26,000 +So in that kind of cases, we can give only partial value. + +23 +00:01:26,000 --> 00:01:28,000 +So I'm just giving the partially like bus. + +24 +00:01:29,000 --> 00:01:31,000 +Can you use a call to answer? + +25 +00:01:31,000 --> 00:01:36,000 +Is no, because we are not comparing exact value so we can use comma again, as we have seen in the + +26 +00:01:36,000 --> 00:01:37,000 +previous approach. + +27 +00:01:38,000 --> 00:01:42,000 +We are putting brackets here and in front of the bracket it contains. + +28 +00:01:43,000 --> 00:01:45,000 +It's a contains we have to use contains. + +29 +00:01:45,000 --> 00:01:53,000 +And I'm just copying this, moving over there so we can use partial insert text. + +30 +00:01:53,000 --> 00:01:56,000 +I'm just putting it here. + +31 +00:01:56,000 --> 00:01:58,000 +And still it is matching means. + +32 +00:01:58,000 --> 00:01:59,000 +Yes, it's working. + +33 +00:02:00,000 --> 00:02:04,000 +So in previous version, we have seen we can use contents with the inner text. + +34 +00:02:05,000 --> 00:02:11,000 +In this session, I shown you here, we can use content with the attribute value as well. + +35 +00:02:11,000 --> 00:02:18,000 +So if you're using content with the attribute value, so there's all we have for this syntax tanks watching + +36 +00:02:18,000 --> 00:02:19,000 +this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/008 Locate Element by Xpath - Syntax 8 Navigate through Parent (Axis)_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/008 Locate Element by Xpath - Syntax 8 Navigate through Parent (Axis)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..68f85bed09921f67754cea81c8d1d4f85d2a2e4d --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/008 Locate Element by Xpath - Syntax 8 Navigate through Parent (Axis)_en.srt @@ -0,0 +1,428 @@ +1 +00:00:01,000 --> 00:00:06,000 +Welcome to the testing world till previous session, we have seen many techniques index, but where + +2 +00:00:06,000 --> 00:00:10,000 +we are using attributes also, we have used in our tests. + +3 +00:00:11,000 --> 00:00:16,000 +But now I'm going to take an example like we have applied all the techniques, but we are not able to + +4 +00:00:16,000 --> 00:00:19,000 +locate any element in that case. + +5 +00:00:20,000 --> 00:00:20,000 +How will we work? + +6 +00:00:21,000 --> 00:00:26,000 +You and we have used in our test, we have used attribute, but still I'm not able to look at it. + +7 +00:00:26,000 --> 00:00:33,000 +Then we have some techniques and these are the advanced techniques, and we also call it access techniques. + +8 +00:00:35,000 --> 00:00:39,000 +So here we are going to locate element to the reference of any other element. + +9 +00:00:40,000 --> 00:00:44,000 +So first of all, I'll show you example in which we are going to locate Element through its. + +10 +00:00:46,000 --> 00:00:47,000 +Okay, I take an example. + +11 +00:00:47,000 --> 00:00:52,000 +I'm just moving here on the HTML and I want to work on this username box. + +12 +00:00:52,000 --> 00:00:54,000 +I'm just refreshing this page. + +13 +00:00:55,000 --> 00:00:57,000 +OK, I want to work on this username box. + +14 +00:00:57,000 --> 00:01:02,000 +I right click and inspect element here. + +15 +00:01:02,000 --> 00:01:03,000 +I'm taking example. + +16 +00:01:03,000 --> 00:01:04,000 +I'm not able to look at this element. + +17 +00:01:05,000 --> 00:01:10,000 +We have applied all the techniques, then how to work on it in that kind of cases when we are not able + +18 +00:01:10,000 --> 00:01:11,000 +to look at element. + +19 +00:01:12,000 --> 00:01:15,000 +Just leave it to its parent. + +20 +00:01:15,000 --> 00:01:19,000 +So if you check it here, the parent of this input is Diddy. + +21 +00:01:20,000 --> 00:01:25,000 +But if you notice this, Diddy is not having any attribute, so it's difficult to locate it. + +22 +00:01:26,000 --> 00:01:28,000 +Okay, let's check again the parent of it. + +23 +00:01:28,000 --> 00:01:31,000 +So again, the parent SDR next parent is dear. + +24 +00:01:32,000 --> 00:01:34,000 +Again, we are not having any tribute. + +25 +00:01:34,000 --> 00:01:36,000 +So just leave it moved to the parent again. + +26 +00:01:37,000 --> 00:01:39,000 +So next parent is thebody again. + +27 +00:01:39,000 --> 00:01:40,000 +We're not having any tribute. + +28 +00:01:41,000 --> 00:01:41,000 +Leave it. + +29 +00:01:42,000 --> 00:01:43,000 +Move to the parent of that. + +30 +00:01:44,000 --> 00:01:48,000 +So here we have a parent with the name table that having some attributes. + +31 +00:01:48,000 --> 00:01:51,000 +OK, so let's try to look at this first. + +32 +00:01:51,000 --> 00:01:54,000 +So first of all, I'm locating any parent here. + +33 +00:01:54,000 --> 00:02:02,000 +So I'm saying table where rule is equal to and the value is presentation. + +34 +00:02:02,000 --> 00:02:05,000 +I just copy so that there's no chance of error. + +35 +00:02:06,000 --> 00:02:09,000 +As of now, we're locating expedient. + +36 +00:02:09,000 --> 00:02:09,000 +Okay, let's see. + +37 +00:02:09,000 --> 00:02:10,000 +It's working or not. + +38 +00:02:11,000 --> 00:02:13,000 +I'm just going to. + +39 +00:02:15,000 --> 00:02:17,000 +Here and yes. + +40 +00:02:17,000 --> 00:02:21,000 +So if you check complete, the table is highlight, it means yes, it is working as of now. + +41 +00:02:22,000 --> 00:02:23,000 +OK, you now what next? + +42 +00:02:24,000 --> 00:02:26,000 +So let me go to that email again. + +43 +00:02:27,000 --> 00:02:28,000 +I'm able to look at the patent. + +44 +00:02:28,000 --> 00:02:32,000 +That's OK now from this patent, from this table. + +45 +00:02:32,000 --> 00:02:37,000 +I want to move to the body, so that's a child of it. + +46 +00:02:37,000 --> 00:02:40,000 +So I'm saying, OK, first look at this didn't go to its child. + +47 +00:02:41,000 --> 00:02:43,000 +So single forward slash means child of it. + +48 +00:02:44,000 --> 00:02:50,000 +So I'm just for me, it's a sick child, which is DeBerry, and the single forward slash means exec + +49 +00:02:50,000 --> 00:02:50,000 +child. + +50 +00:02:51,000 --> 00:02:52,000 +Then inside the body. + +51 +00:02:52,000 --> 00:02:57,000 +If you check it, we have PR, but we need to go to the second tier. + +52 +00:02:58,000 --> 00:03:00,000 +So the urban diet too. + +53 +00:03:00,000 --> 00:03:04,000 +So I'm saying, OK, baby, ah. + +54 +00:03:04,000 --> 00:03:06,000 +And on the second tier. + +55 +00:03:06,000 --> 00:03:09,000 +So first of all, from the table, I'm going to the body. + +56 +00:03:09,000 --> 00:03:12,000 +Then from the DeBerry, I'm going to the second tier. + +57 +00:03:13,000 --> 00:03:18,000 +Then in this year, we have one Diddy due to be treated multiple Diddy. + +58 +00:03:18,000 --> 00:03:20,000 +I want to go to the first Diddy. + +59 +00:03:21,000 --> 00:03:24,000 +So I'm saying, OK, then go to the Diddy first. + +60 +00:03:25,000 --> 00:03:28,000 +And in the first Diddy, we have the element input. + +61 +00:03:29,000 --> 00:03:30,000 +So it just input. + +62 +00:03:31,000 --> 00:03:36,000 +So here we are, trying to look at the text box by using its spirit. + +63 +00:03:36,000 --> 00:03:38,000 +OK, let me try. + +64 +00:03:38,000 --> 00:03:39,000 +Is it working or not? + +65 +00:03:40,000 --> 00:03:47,000 +So if we check here that element is highlighted means we are locating an element through its parent. + +66 +00:03:48,000 --> 00:03:52,000 +And that is very important because in many cases, you will find out you are not able to locate that + +67 +00:03:52,000 --> 00:03:53,000 +element directly. + +68 +00:03:53,000 --> 00:03:56,000 +So here we are, indirectly locating that element through its parent. + +69 +00:03:57,000 --> 00:03:59,000 +And this approach we should be aware about. + +70 +00:03:59,000 --> 00:04:06,000 +We should we should carefully watch that stimulate this case because here we have look at the table. + +71 +00:04:06,000 --> 00:04:08,000 +I want to go to the child of it. + +72 +00:04:08,000 --> 00:04:12,000 +But in the child of the table, we'll be body. + +73 +00:04:12,000 --> 00:04:14,000 +We already know body. + +74 +00:04:14,000 --> 00:04:18,000 +If I mention the body, it is going to the child of it. + +75 +00:04:18,000 --> 00:04:24,000 +But if you check it here, the body, we have multiple tiers and I want to go to the second one. + +76 +00:04:24,000 --> 00:04:26,000 +So we mention the other two. + +77 +00:04:27,000 --> 00:04:29,000 +And then we have in the data we have. + +78 +00:04:30,000 --> 00:04:32,000 +But we have multiple did. + +79 +00:04:32,000 --> 00:04:35,000 +So I mentioned Didi one and then input. + +80 +00:04:36,000 --> 00:04:39,000 +So we have located an element through its spirit. + +81 +00:04:40,000 --> 00:04:46,000 +And this hierarchy could be bigger or smaller than this because as of now, if we check it, input parent + +82 +00:04:46,000 --> 00:04:49,000 +is Didi, which is not having any attribute. + +83 +00:04:49,000 --> 00:04:54,000 +But if it has any attribute, OK, let me take an example of my application here. + +84 +00:04:55,000 --> 00:04:58,000 +I'll just go to this log in depth. + +85 +00:04:59,000 --> 00:05:03,000 +I want to look at this, but I'm taking Zumba like I'm not able to look at it directly. + +86 +00:05:03,000 --> 00:05:08,000 +So if I check label parent is L.A., it is not having an attribute. + +87 +00:05:08,000 --> 00:05:12,000 +OK, being under the L.A., is you L.A. having a class? + +88 +00:05:12,000 --> 00:05:24,000 +So what I do, I just pop it as you well, and I'm just copying this, OK, I'm writing like u l and. + +89 +00:05:26,000 --> 00:05:28,000 +My glass is this. + +90 +00:05:29,000 --> 00:05:32,000 +Well, first of all, let me show you we are able to look at this or not. + +91 +00:05:33,000 --> 00:05:35,000 +I'll disclose it. + +92 +00:05:36,000 --> 00:05:38,000 +Here we are checking. + +93 +00:05:39,000 --> 00:05:49,000 +So we are able to look at it, that's OK now if we take it here from this, you'll I want to go to the + +94 +00:05:49,000 --> 00:05:50,000 +second L.A. + +95 +00:05:50,000 --> 00:05:57,000 +So that is a do and there we have label. + +96 +00:05:58,000 --> 00:06:03,000 +So we are not going to the label to because inside this L.A. we have to eliminate. + +97 +00:06:03,000 --> 00:06:04,000 +One is input, one is label. + +98 +00:06:05,000 --> 00:06:07,000 +So if I mentioned input, it will always go to this one. + +99 +00:06:07,000 --> 00:06:10,000 +If I mentioned label, it will always go to this one. + +100 +00:06:10,000 --> 00:06:13,000 +So I just mentioned label this copied. + +101 +00:06:14,000 --> 00:06:17,000 +And let me highlight that. + +102 +00:06:20,000 --> 00:06:21,000 +So that is highlighted. + +103 +00:06:22,000 --> 00:06:24,000 +So, yes, we are able to look at that element through its. + +104 +00:06:25,000 --> 00:06:29,000 +And that is going to be used when we have complex D.M.. + +105 +00:06:29,000 --> 00:06:31,000 +So it's going to be used very frequently with you. + +106 +00:06:33,000 --> 00:06:36,000 +So in this session, we have seen how we can look at element to its parent. + +107 +00:06:37,000 --> 00:06:40,000 +There's all we have for the session tanks watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/009 Locate Element by Xpath - Syntax 9 Navigate through Child(Axis)_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/009 Locate Element by Xpath - Syntax 9 Navigate through Child(Axis)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..d419b6b36ff8ac8fa670ba520a213ff22b6dfe92 --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/009 Locate Element by Xpath - Syntax 9 Navigate through Child(Axis)_en.srt @@ -0,0 +1,172 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:07,000 +And this session, I'll show you how we can locate Element through its child. + +3 +00:00:08,000 --> 00:00:12,000 +In previous session, we've already seen how we can locate Element to its parent. + +4 +00:00:12,000 --> 00:00:14,000 +But actually the reverse of that? + +5 +00:00:15,000 --> 00:00:21,000 +Let me move to the browser first, and that's we're on the Facebook, and I'm just dicking some people. + +6 +00:00:21,000 --> 00:00:23,000 +First of all, this refresh. + +7 +00:00:24,000 --> 00:00:30,000 +OK, I'm taking example like I'll just check this username textbooks. + +8 +00:00:30,000 --> 00:00:37,000 +I'm able to locate this username textbooks, but actually I want to work on this table and I'm not able + +9 +00:00:37,000 --> 00:00:39,000 +to locate this table directly. + +10 +00:00:41,000 --> 00:00:44,000 +So knowledge who you how we can locate any element through its child. + +11 +00:00:44,000 --> 00:00:47,000 +So first of all, I'll show you how we can look at this. + +12 +00:00:47,000 --> 00:00:55,000 +So I'm just writing like input, where my type is equal to emails, OK, I'm going to use attribute + +13 +00:00:56,000 --> 00:01:00,000 +type and the value is email, so I'm able to look at this element. + +14 +00:01:01,000 --> 00:01:04,000 +I'm taking example when we're able to look at any element. + +15 +00:01:05,000 --> 00:01:06,000 +Yes, we are able to look at it. + +16 +00:01:07,000 --> 00:01:08,000 +I don't want to work on this. + +17 +00:01:08,000 --> 00:01:14,000 +I want to work on its parent, which is a table to how we can move from child to the parent. + +18 +00:01:15,000 --> 00:01:19,000 +So if it check it here, the parent of this input is Diddy. + +19 +00:01:20,000 --> 00:01:27,000 +So we have to mention for words this parent, Colin Colin Beatty, means move to the reverse direction, + +20 +00:01:27,000 --> 00:01:29,000 +not in the child friction. + +21 +00:01:29,000 --> 00:01:34,000 +Now, move the parent to times Colin and then be his biggest diddy. + +22 +00:01:35,000 --> 00:01:41,000 +Then again, I need to move to the theater, but do I need to mention second year answer is no for this + +23 +00:01:41,000 --> 00:01:41,000 +kid. + +24 +00:01:41,000 --> 00:01:44,000 +It has only one parent with just d.r. + +25 +00:01:44,000 --> 00:01:50,000 +So we just need to mention parent Colin Colin Dyer in the same way. + +26 +00:01:50,000 --> 00:01:54,000 +Now we are the theater parent of this year is DeBerry. + +27 +00:01:54,000 --> 00:02:06,000 +So again, parent Colin Colin Thebody and now at the last, I want to go to the table. + +28 +00:02:07,000 --> 00:02:09,000 +So we just parent of this Diwali. + +29 +00:02:09,000 --> 00:02:13,000 +So I mentioned parent Colin Colin table. + +30 +00:02:14,000 --> 00:02:20,000 +So that's a simple spot we are writing in which we are just moving in the right direction. + +31 +00:02:20,000 --> 00:02:22,000 +Now we are moving from a child to parent. + +32 +00:02:23,000 --> 00:02:28,000 +I'll just copy this moving to see an expert checker. + +33 +00:02:29,000 --> 00:02:32,000 +Just write it over here, so if you notice that is highlighted. + +34 +00:02:34,000 --> 00:02:38,000 +So we need to be careful because we need to check exact. + +35 +00:02:38,000 --> 00:02:45,000 +If we take it here, we cannot navigate directly from input to the table. + +36 +00:02:45,000 --> 00:02:47,000 +We have to follow this hierarchy. + +37 +00:02:47,000 --> 00:02:53,000 +The parent of the input is then the parent of this data is Diane, then Peabody and the table. + +38 +00:02:53,000 --> 00:02:55,000 +So we are following this complete hierarchy. + +39 +00:02:57,000 --> 00:03:02,000 +So here in the session, we have seen how we can look it element through truth child. + +40 +00:03:02,000 --> 00:03:04,000 +And that is again advanced technique. + +41 +00:03:05,000 --> 00:03:06,000 +We are going to use it in the complex. + +42 +00:03:08,000 --> 00:03:09,000 +That's all we have for the session. + +43 +00:03:10,000 --> 00:03:11,000 +Thanks for watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/010 Locate Element by Xpath - Syntax 10 Navigate towards Sibling(Next & Previous)_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/010 Locate Element by Xpath - Syntax 10 Navigate towards Sibling(Next & Previous)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..c5351db0aa1078f0182c852a85f8e48eed41c9ca --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/010 Locate Element by Xpath - Syntax 10 Navigate towards Sibling(Next & Previous)_en.srt @@ -0,0 +1,208 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:07,000 +So in previous two sessions, we have seen how we can look at an element through spirit. + +3 +00:00:08,000 --> 00:00:11,000 +And secondly, you see how we can look at the element towards child. + +4 +00:00:12,000 --> 00:00:14,000 +Now I'll talk about siblings. + +5 +00:00:14,000 --> 00:00:18,000 +So first of all, we need to understand what you mean by the siblings. + +6 +00:00:18,000 --> 00:00:25,000 +OK, now I'm moving to the table and here let me show you a general of this slogan. + +7 +00:00:26,000 --> 00:00:32,000 +So if we check it, these two elements like input and the labels are on the same level. + +8 +00:00:32,000 --> 00:00:36,000 +So element, which are on the same level that is called sibling. + +9 +00:00:37,000 --> 00:00:42,000 +So here I'll show you how we can look at element to its sibling. + +10 +00:00:42,000 --> 00:00:43,000 +Some big example. + +11 +00:00:43,000 --> 00:00:48,000 +I'm able to look at this input like this, but I want to work on this label. + +12 +00:00:49,000 --> 00:00:56,000 +So first of all, I'm writing Exparte like for this input input where name is equal to this. + +13 +00:00:57,000 --> 00:01:02,000 +OK, I'm writing like in what their name is equal to this. + +14 +00:01:04,000 --> 00:01:09,000 +I'm taking example when we are not able to look at this label directly, so I'll show you how we can + +15 +00:01:09,000 --> 00:01:11,000 +look at it through its sibling. + +16 +00:01:11,000 --> 00:01:14,000 +OK, now let me check it first. + +17 +00:01:14,000 --> 00:01:15,000 +Is it working or not? + +18 +00:01:17,000 --> 00:01:21,000 +So it shows it is matching with two elements and that is not highlighted. + +19 +00:01:21,000 --> 00:01:22,000 +Okay. + +20 +00:01:23,000 --> 00:01:24,000 +What I do? + +21 +00:01:24,000 --> 00:01:26,000 +Let me try with some other. + +22 +00:01:28,000 --> 00:01:32,000 +Other option in put name, we have used it. + +23 +00:01:32,000 --> 00:01:33,000 +I'll try to use. + +24 +00:01:33,000 --> 00:01:38,000 +So first of all, I want to look at this input only after that, I'll write more to its sibling. + +25 +00:01:38,000 --> 00:01:43,000 +So here idea is this. + +26 +00:01:44,000 --> 00:01:50,000 +So if you check it here, it is not deflecting the joy, but a feature kit that is reflecting in the + +27 +00:01:51,000 --> 00:01:52,000 +end is matching with the one element. + +28 +00:01:53,000 --> 00:01:54,000 +It is matching with the exactly one element. + +29 +00:01:55,000 --> 00:01:57,000 +So I'm just checking like, OK, that is correct. + +30 +00:01:58,000 --> 00:02:00,000 +I'll just take it here. + +31 +00:02:01,000 --> 00:02:03,000 +No, I don't want to work on this input. + +32 +00:02:04,000 --> 00:02:07,000 +I want to work on the label, which is in front of that. + +33 +00:02:07,000 --> 00:02:10,000 +So in that case, following. + +34 +00:02:13,000 --> 00:02:15,000 +Hyphen sibling. + +35 +00:02:16,000 --> 00:02:21,000 +Colin Cullen, so I'm saying following sibling meets sibling, which is next to it. + +36 +00:02:22,000 --> 00:02:23,000 +What's a bag of this? + +37 +00:02:23,000 --> 00:02:24,000 +It's a label. + +38 +00:02:24,000 --> 00:02:26,000 +So I mentioned Al B. in. + +39 +00:02:27,000 --> 00:02:30,000 +OK, let me copy this and. + +40 +00:02:32,000 --> 00:02:33,000 +I'll show you here. + +41 +00:02:37,000 --> 00:02:38,000 +So that is highlighted. + +42 +00:02:38,000 --> 00:02:42,000 +So means we are locating element through its sibling. + +43 +00:02:44,000 --> 00:02:52,000 +And if I show you achievements of the writing falling sibling just because this label is off, great + +44 +00:02:53,000 --> 00:02:54,000 +label is after this. + +45 +00:02:55,000 --> 00:03:01,000 +So if this label is before, to this on the place of following, we are going to mention preceding. + +46 +00:03:04,000 --> 00:03:10,000 +Preceding, as of now, we are not using this hitting because it is after this, but if it is before + +47 +00:03:10,000 --> 00:03:12,000 +this, we have to mention visiting sibling. + +48 +00:03:13,000 --> 00:03:17,000 +Here we have seen how we can look at an element to its sibling. + +49 +00:03:17,000 --> 00:03:23,000 +In next session, I'll show you a complex x spot in which we are going to use parent child sibling approaches + +50 +00:03:24,000 --> 00:03:26,000 +that will go up in the next video. + +51 +00:03:26,000 --> 00:03:28,000 +That's all we have for the session. + +52 +00:03:29,000 --> 00:03:30,000 +Thanks for watching this video. + diff --git a/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/011 Locate Element by Xpath - Syntax 11 Use Parent, Child & Sibling_en.srt b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/011 Locate Element by Xpath - Syntax 11 Use Parent, Child & Sibling_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..a070dc42f4aca9c2b3106fb5d03dbd57c6dcde02 --- /dev/null +++ b/31 - Learn How to use Xpath Best Practices & Techniques to Write Xpath/011 Locate Element by Xpath - Syntax 11 Use Parent, Child & Sibling_en.srt @@ -0,0 +1,260 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the wrestling world. + +2 +00:00:03,000 --> 00:00:08,000 +So previously, we have seen few approaches in which we are going from parent, child, child to parent. + +3 +00:00:09,000 --> 00:00:10,000 +We are moving siblings. + +4 +00:00:10,000 --> 00:00:12,000 +It's the following sibling and preceding sibling. + +5 +00:00:13,000 --> 00:00:23,000 +Now I'll show you how we can look it element by using multiple approaches, by using many syntax together, + +6 +00:00:23,000 --> 00:00:27,000 +like I'll move to the parent, then child, then we are moving to the sibling. + +7 +00:00:27,000 --> 00:00:29,000 +So let me show you the scenario. + +8 +00:00:29,000 --> 00:00:32,000 +First, I'm on the Facebook page. + +9 +00:00:32,000 --> 00:00:33,000 +I'll just refresh it. + +10 +00:00:35,000 --> 00:00:35,000 +Yeah. + +11 +00:00:35,000 --> 00:00:44,000 +So I'm able to I'm taking example, I'm able to locate this username textbox, so I'm able to look at + +12 +00:00:44,000 --> 00:00:44,000 +this. + +13 +00:00:44,000 --> 00:00:50,000 +But if you check that the password text box and I'm taking example, I'm not able to locate it. + +14 +00:00:51,000 --> 00:00:54,000 +So I'll try to look at password through username. + +15 +00:00:55,000 --> 00:01:00,000 +How we can do that, OK, if I'm able to look at username, I'll move to the parent of it, which is. + +16 +00:01:01,000 --> 00:01:05,000 +Then I'll move to the following sibling, which is an entity that allowed the child of it. + +17 +00:01:06,000 --> 00:01:10,000 +So we're using parent, then following sibling and then child. + +18 +00:01:12,000 --> 00:01:14,000 +Let me show you how we can write it. + +19 +00:01:14,000 --> 00:01:16,000 +So first of all, I'm writing. + +20 +00:01:17,000 --> 00:01:27,000 +In put, where it is equal to email means I'm able to look at that the username box, which is this + +21 +00:01:28,000 --> 00:01:31,000 +I want to move to the experience which is did. + +22 +00:01:31,000 --> 00:01:35,000 +So I mentioned like parent Colin Colin, Disney. + +23 +00:01:36,000 --> 00:01:38,000 +So now I'm here on that day. + +24 +00:01:39,000 --> 00:01:45,000 +I want to move its following sibling, which is an entity some mention following. + +25 +00:01:47,000 --> 00:01:48,000 +Sibling. + +26 +00:01:50,000 --> 00:01:51,000 +Colin, Colin did. + +27 +00:01:52,000 --> 00:01:57,000 +And one thing that to be noticed after this, we have two following siblings, which is we started. + +28 +00:01:58,000 --> 00:02:01,000 +I want to go to the first one, so I just mention first. + +29 +00:02:03,000 --> 00:02:09,000 +No, in this Judy Goodrich child, which is input whenever we are going to child, it just mentioned + +30 +00:02:09,000 --> 00:02:10,000 +input. + +31 +00:02:10,000 --> 00:02:16,000 +So that is the way in which we have locating a password box through username. + +32 +00:02:17,000 --> 00:02:18,000 +Let me show you here. + +33 +00:02:19,000 --> 00:02:23,000 +And it matches with the one element, if you check it, that is highlighted. + +34 +00:02:25,000 --> 00:02:29,000 +So we are able to locate an element by using parent, child, sibling. + +35 +00:02:30,000 --> 00:02:32,000 +All these approaches in a single case, in a single case. + +36 +00:02:33,000 --> 00:02:36,000 +So again, if you check attachment, I'll show you again. + +37 +00:02:38,000 --> 00:02:40,000 +Input, that's element, which I'm locating. + +38 +00:02:40,000 --> 00:02:46,000 +I'm just moving to the parent of each X, which is then I'm over to the next sibling, which is an entity + +39 +00:02:47,000 --> 00:02:48,000 +and then child of it. + +40 +00:02:49,000 --> 00:02:51,000 +OK, let's do the reverse of that. + +41 +00:02:51,000 --> 00:02:55,000 +I'm able to look at this password box, so I'm writing like. + +42 +00:02:57,000 --> 00:02:57,000 +Input. + +43 +00:02:58,000 --> 00:03:03,000 +And where it is equal to. + +44 +00:03:03,000 --> 00:03:11,000 +And the idea here is this one which is bus able to I'm taking example when I'm able to look at ballot + +45 +00:03:11,000 --> 00:03:14,000 +box through password, I want to look at username. + +46 +00:03:15,000 --> 00:03:19,000 +And these are the example when we're not able to look at element directly. + +47 +00:03:19,000 --> 00:03:24,000 +So if you're writing the complex expert to look at it in some reference, so I'm able to look at this + +48 +00:03:25,000 --> 00:03:25,000 +password. + +49 +00:03:26,000 --> 00:03:27,000 +I just want to move to it. + +50 +00:03:27,000 --> 00:03:32,000 +Movenpick experiment, which is did so I mentioned parent colon colon. + +51 +00:03:35,000 --> 00:03:43,000 +Then I want to know we get its presenting sibling, which is again, and we have only one preceding + +52 +00:03:43,000 --> 00:03:43,000 +sibling. + +53 +00:03:43,000 --> 00:03:52,000 +So we need not to mention one or two preceding preceding sibling colon colon PD. + +54 +00:03:54,000 --> 00:03:57,000 +And through the study, I'll move to the input child of it. + +55 +00:03:58,000 --> 00:03:59,000 +Its input. + +56 +00:04:00,000 --> 00:04:03,000 +So when we're directly moving to the child just forward slash, it'll move to the child. + +57 +00:04:05,000 --> 00:04:06,000 +I'll just copy this. + +58 +00:04:07,000 --> 00:04:08,000 +Let me show you here. + +59 +00:04:09,000 --> 00:04:16,000 +And yes, we are able to look at username through password with reference of password. + +60 +00:04:17,000 --> 00:04:24,000 +So here we have seen how we can make complex export, though by merging many techniques together. + +61 +00:04:25,000 --> 00:04:27,000 +So all these techniques that we have gone through can march together. + +62 +00:04:28,000 --> 00:04:29,000 +Our syntax should be correct. + +63 +00:04:30,000 --> 00:04:32,000 +There's all we have for the session here. + +64 +00:04:32,000 --> 00:04:37,000 +We have seen how we can write Complex X, but that's all we have. + +65 +00:04:38,000 --> 00:04:39,000 +Thanks for watching this video. + diff --git a/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/001 How to Setup Selenium Library on Python using PIP_en.srt b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/001 How to Setup Selenium Library on Python using PIP_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..6763abbae1d2713d0ab99161e6462980248a2e32 --- /dev/null +++ b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/001 How to Setup Selenium Library on Python using PIP_en.srt @@ -0,0 +1,96 @@ +1 +00:00:00,000 --> 00:00:08,000 +Welcome to the testing world and this session, I'll show you how we can write foster skills in selenium + +2 +00:00:08,000 --> 00:00:09,000 +with Python. + +3 +00:00:10,000 --> 00:00:16,000 +So first of all, we have to satisfy a few prerequisites like we need to install Python. + +4 +00:00:16,000 --> 00:00:19,000 +So previous version, we have already set a python, so that is done. + +5 +00:00:20,000 --> 00:00:24,000 +We need to set up by Jump or any other editor. + +6 +00:00:24,000 --> 00:00:28,000 +So by jump, it's the editor for writing Python code. + +7 +00:00:28,000 --> 00:00:34,000 +I'm using community words and means it's a free was and we can use any of the editors as well. + +8 +00:00:35,000 --> 00:00:38,000 +Then we need to set up Selenium Package. + +9 +00:00:38,000 --> 00:00:41,000 +So if you have if you already have the start, that's fine. + +10 +00:00:41,000 --> 00:00:47,000 +If you don't have, we need to go to a command prompt and we need right, write PIP. + +11 +00:00:49,000 --> 00:00:59,000 +Install selenium, we need to install selenium as I ain't going to install selenium package, it's going + +12 +00:00:59,000 --> 00:00:59,000 +to take some time. + +13 +00:00:59,000 --> 00:01:04,000 +I'm just waiting for this package to be installed successfully so it doesn't start. + +14 +00:01:04,000 --> 00:01:09,000 +Latest package, which just three point twelve point zero So step one is done. + +15 +00:01:10,000 --> 00:01:13,000 +So here, if you can check all the prerequisites are done. + +16 +00:01:13,000 --> 00:01:21,000 +We we where we have set up items we have already installed by June and now we have set up selenium package. + +17 +00:01:22,000 --> 00:01:27,000 +Now, once you set up any package, you can go and check. + +18 +00:01:28,000 --> 00:01:30,000 +Do we have the debt package or not? + +19 +00:01:30,000 --> 00:01:36,000 +First of all, I need to write Python, so I'm on a Python interpreter now and I'm writing like help + +20 +00:01:38,000 --> 00:01:40,000 +and modules. + +21 +00:01:42,000 --> 00:01:48,000 +So it is stretching all the modules which are installed as of now, so let me show you. + +22 +00:01:48,000 --> 00:01:51,000 +Do we have selenium installed or not? + +23 +00:01:52,000 --> 00:01:59,000 +So it is giving me lot of modules and if I take it over here, so do we have selenium? + +24 +00:02:00,000 --> 00:02:06,000 +And if you see here we are getting selenium module means that is installed. + diff --git a/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/002 Write First TestCase Open Browser Enter URL Maximize_en.srt b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/002 Write First TestCase Open Browser Enter URL Maximize_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..7fbfbff78dde79990bdd2447a8b0a95ecb290c2a --- /dev/null +++ b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/002 Write First TestCase Open Browser Enter URL Maximize_en.srt @@ -0,0 +1,568 @@ +1 +00:00:00,000 --> 00:00:05,000 +Now we have done all the predicted options now, almost to how we can drive this case. + +2 +00:00:06,000 --> 00:00:08,000 +So in this case, I'm going to start browser. + +3 +00:00:08,000 --> 00:00:12,000 +Enter the URL, enter data into the text box. + +4 +00:00:12,000 --> 00:00:18,000 +Click on the radio button, click on the check box and then click on Button. + +5 +00:00:19,000 --> 00:00:21,000 +So these are the different options I'm going to use. + +6 +00:00:22,000 --> 00:00:27,000 +First of all, I'm just showing you my best application, which I'm going to use for the session. + +7 +00:00:29,000 --> 00:00:30,000 +That's our test application. + +8 +00:00:31,000 --> 00:00:32,000 +And here we have a register page. + +9 +00:00:32,000 --> 00:00:37,000 +So you are all is that testing word dot com for watchlist testing. + +10 +00:00:38,000 --> 00:00:41,000 +So that's why you are which you can use for practice. + +11 +00:00:41,000 --> 00:00:44,000 +Pope was so that's that you are all of the application. + +12 +00:00:44,000 --> 00:00:48,000 +Now I want to open browser and you to enter data into the text box. + +13 +00:00:49,000 --> 00:00:52,000 +So I'm just moving to Page Editor. + +14 +00:00:54,000 --> 00:00:55,000 +That's my editor. + +15 +00:00:55,000 --> 00:01:01,000 +First of all, we need to create a new project so we can go, file and create a new project or whatever + +16 +00:01:01,000 --> 00:01:02,000 +the name you want to give. + +17 +00:01:02,000 --> 00:01:06,000 +I'm just giving like selenium automation. + +18 +00:01:07,000 --> 00:01:09,000 +Also, if you have multiple interpreter. + +19 +00:01:10,000 --> 00:01:15,000 +So if you installed multiple versions of the Python, you can select which Python you want to use. + +20 +00:01:16,000 --> 00:01:23,000 +So as of now, I'm just using the Python and I'm going to use this, so I just click on to create a + +21 +00:01:23,000 --> 00:01:26,000 +new project will be created. + +22 +00:01:28,000 --> 00:01:33,000 +Now, as of now, I'm not following any structure, I'm not following any unit testing tool. + +23 +00:01:34,000 --> 00:01:36,000 +I'm just writing back Python code. + +24 +00:01:37,000 --> 00:01:38,000 +Let it open and then I'll start. + +25 +00:01:39,000 --> 00:01:40,000 +So here it is open. + +26 +00:01:41,000 --> 00:01:47,000 +Now, if you want to check one option that I want to show you, if you have multiple python in your + +27 +00:01:47,000 --> 00:01:53,000 +system like it is possible that you have installed Python 3.6, you install Python two point seven and + +28 +00:01:53,000 --> 00:01:56,000 +you want to check which Python is used. + +29 +00:01:56,000 --> 00:01:59,000 +As of now, we can go to the file setting. + +30 +00:02:00,000 --> 00:02:05,000 +Here we have the option of project inside the project project interpreter. + +31 +00:02:05,000 --> 00:02:07,000 +So here it shows which Python you are using. + +32 +00:02:07,000 --> 00:02:08,000 +We are using Python 3.6. + +33 +00:02:09,000 --> 00:02:15,000 +And if you take it over here, there is like package that is installed on the Python 3.6. + +34 +00:02:16,000 --> 00:02:17,000 +Everything is OK. + +35 +00:02:17,000 --> 00:02:18,000 +I would just click on that. + +36 +00:02:18,000 --> 00:02:25,000 +OK, now I'm going to create a file, so I just right click on the project new and we have a Python + +37 +00:02:25,000 --> 00:02:26,000 +file. + +38 +00:02:26,000 --> 00:02:27,000 +What is the name of the file you want to give? + +39 +00:02:28,000 --> 00:02:30,000 +So I'm just giving like first. + +40 +00:02:31,000 --> 00:02:36,000 +Best guess, and that's but that's a beautiful means Python file. + +41 +00:02:37,000 --> 00:02:39,000 +Now I have shown you my application. + +42 +00:02:39,000 --> 00:02:43,000 +And previously we have seen how we can look at each and every element. + +43 +00:02:43,000 --> 00:02:45,000 +We have gone through different element locators. + +44 +00:02:46,000 --> 00:02:49,000 +Now I want to work on this page. + +45 +00:02:50,000 --> 00:02:54,000 +So I want to enter data into these text boxes. + +46 +00:02:54,000 --> 00:02:55,000 +So these are the text boxes. + +47 +00:02:55,000 --> 00:02:57,000 +I'll show you how we can work on that. + +48 +00:02:57,000 --> 00:03:06,000 +Then I need to click on this radio button will go with the checkbox and then we'll go over that button. + +49 +00:03:07,000 --> 00:03:09,000 +That's what elements like dropdown and link. + +50 +00:03:09,000 --> 00:03:11,000 +I'm going to go in the coming sessions. + +51 +00:03:12,000 --> 00:03:17,000 +So first of all, I want to work on Chrome browser. + +52 +00:03:17,000 --> 00:03:20,000 +So previously we have seen like, that's my task. + +53 +00:03:21,000 --> 00:03:26,000 +First of all, we need to import glass with the name Chrome because I want to execute my task. + +54 +00:03:26,000 --> 00:03:38,000 +Given the Chrome browser from Selenium Dot, Web driver import Chrome and we have already seen what + +55 +00:03:38,000 --> 00:03:40,000 +do you mean by the from and import? + +56 +00:03:41,000 --> 00:03:45,000 +So here I'm just writing the test case means from this package. + +57 +00:03:46,000 --> 00:03:46,000 +All right. + +58 +00:03:46,000 --> 00:03:47,000 +It's a module. + +59 +00:03:47,000 --> 00:03:50,000 +I'm going to import this class now. + +60 +00:03:50,000 --> 00:03:54,000 +I need to create object of the chrome class so how we can buy that object. + +61 +00:03:54,000 --> 00:03:58,000 +So I'm writing like driver is equal to chrome. + +62 +00:04:00,000 --> 00:04:01,000 +So that's the object I have created. + +63 +00:04:02,000 --> 00:04:03,000 +No object is created. + +64 +00:04:03,000 --> 00:04:09,000 +I want to enter your driver dock and we have a method with the name get. + +65 +00:04:10,000 --> 00:04:14,000 +I'm just giving that you are like S&P W W W the. + +66 +00:04:15,000 --> 00:04:16,000 +Testing. + +67 +00:04:18,000 --> 00:04:22,000 +Word dot com for worthless testings. + +68 +00:04:23,000 --> 00:04:24,000 +There's the application you are. + +69 +00:04:25,000 --> 00:04:28,000 +As of now, we are just getting browser object. + +70 +00:04:28,000 --> 00:04:34,000 +We are calling get method by which we can enter the URL when we create object of the chrome class. + +71 +00:04:35,000 --> 00:04:39,000 +This is a constructor which should be good and it should open browser. + +72 +00:04:39,000 --> 00:04:43,000 +But as of now, if I try to execute this, it will not open browser. + +73 +00:04:43,000 --> 00:04:44,000 +It will give me ETA. + +74 +00:04:44,000 --> 00:04:45,000 +What ETA? + +75 +00:04:45,000 --> 00:04:46,000 +Let me show you. + +76 +00:04:47,000 --> 00:04:48,000 +I'm just running it. + +77 +00:04:48,000 --> 00:04:50,000 +And here we are getting error. + +78 +00:04:51,000 --> 00:04:57,000 +First of all, if we check this ETA, it shows for Chrome browser executable need to be in the path? + +79 +00:04:58,000 --> 00:04:59,000 +What does it mean? + +80 +00:04:59,000 --> 00:05:02,000 +Hidden palladium to communicate with the browser? + +81 +00:05:02,000 --> 00:05:09,000 +We need a driver ICSI file, which is going to behave as an interface between my test, gif and browser + +82 +00:05:10,000 --> 00:05:12,000 +so we cannot communicate with the browser directly. + +83 +00:05:12,000 --> 00:05:16,000 +We need that interface, and that interface will be provided by that easy. + +84 +00:05:17,000 --> 00:05:24,000 +In simple words, we can understand it like we need a software which is going to make a bridge between + +85 +00:05:24,000 --> 00:05:26,000 +mitosis and browser. + +86 +00:05:26,000 --> 00:05:31,000 +So from there, we can get the software that you are given for Chrome. + +87 +00:05:31,000 --> 00:05:35,000 +You can download it from this location and for each browser. + +88 +00:05:35,000 --> 00:05:39,000 +If you're not setting that, it will give you, you order from where you can download it. + +89 +00:05:40,000 --> 00:05:44,000 +So I'm just coming here and just using that to you all. + +90 +00:05:46,000 --> 00:05:46,000 +Okay? + +91 +00:05:47,000 --> 00:05:49,000 +Ladies, wasn't is two point thirty eight. + +92 +00:05:49,000 --> 00:05:56,000 +So just click on this and this is going to work for 65 to 67 was another chrome. + +93 +00:05:56,000 --> 00:06:01,000 +So if you're not aware about your Chrome wasn't fussed, check what is our version of the Chrome. + +94 +00:06:01,000 --> 00:06:03,000 +So I'm just going to talk about Google Chrome. + +95 +00:06:06,000 --> 00:06:12,000 +Here just we have a 66 was, and if I have a 66 was in this country, what is going to work for me. + +96 +00:06:12,000 --> 00:06:19,000 +So I just click on this and for which always you want, I want for Windows 32. + +97 +00:06:20,000 --> 00:06:22,000 +It is going to work for Windows 32 as well as 64 bit. + +98 +00:06:23,000 --> 00:06:24,000 +So just click on this. + +99 +00:06:24,000 --> 00:06:28,000 +It's going to download a different file once that will be downloaded. + +100 +00:06:28,000 --> 00:06:30,000 +I'm just cancelling it because I already have. + +101 +00:06:30,000 --> 00:06:31,000 +We need to sit. + +102 +00:06:31,000 --> 00:06:35,000 +This easy path in our desk is how we can set it. + +103 +00:06:36,000 --> 00:06:37,000 +I'm just moving to the desk. + +104 +00:06:38,000 --> 00:06:43,000 +And before clearing, the object of the browser means object to the chrome glass. + +105 +00:06:43,000 --> 00:06:44,000 +I'm just going here. + +106 +00:06:44,000 --> 00:06:52,000 +I'm seeing my path is equal to and whatever the path you are having for that easy file in my system, + +107 +00:06:54,000 --> 00:06:58,000 +I have that to pop off my ex-wife. + +108 +00:06:58,000 --> 00:06:59,000 +So I just copied that. + +109 +00:06:59,000 --> 00:07:02,000 +You have downloaded to file, just unzip it. + +110 +00:07:02,000 --> 00:07:03,000 +You will get to file. + +111 +00:07:03,000 --> 00:07:05,000 +So that's a pop of that easy file. + +112 +00:07:06,000 --> 00:07:10,000 +And just the name with extension. + +113 +00:07:10,000 --> 00:07:11,000 +That's the complete path. + +114 +00:07:12,000 --> 00:07:17,000 +Whenever we are giving path, it's always a good practice to use double backwards slash. + +115 +00:07:18,000 --> 00:07:21,000 +So I'm just using double backwards. + +116 +00:07:22,000 --> 00:07:26,000 +Now we have defined the part now in front of the while creating the object. + +117 +00:07:26,000 --> 00:07:29,000 +We are going to use executable part is equal to. + +118 +00:07:29,000 --> 00:07:36,000 +But so what we are doing, we are creating a variable in which the part of that easy file is stored. + +119 +00:07:36,000 --> 00:07:42,000 +And here we are, splitting the object we are passing like executable part value is equal to whatever + +120 +00:07:42,000 --> 00:07:43,000 +the part you have stored. + +121 +00:07:44,000 --> 00:07:45,000 +Now I'm going to execute. + +122 +00:07:45,000 --> 00:07:51,000 +The same task is now should open browser and it should enter. + +123 +00:07:54,000 --> 00:07:58,000 +You are onto the browser, so if you check it here, that is started. + +124 +00:07:59,000 --> 00:08:06,000 +So step one is done where we have started browser, so that might step one, I'd say. + +125 +00:08:06,000 --> 00:08:14,000 +I would say step one is done open browser and step two is to. + +126 +00:08:16,000 --> 00:08:18,000 +And tell you all that is done. + +127 +00:08:19,000 --> 00:08:30,000 +No, I want to maximize Belzer, so I am I'm saying step three, we can go for maximizing browser, + +128 +00:08:31,000 --> 00:08:37,000 +so maximize browser as of now, if you notice browser and started, but that's not enough the maximize + +129 +00:08:37,000 --> 00:08:38,000 +mode. + +130 +00:08:38,000 --> 00:08:40,000 +So I want to maximize it. + +131 +00:08:40,000 --> 00:08:41,000 +What I can do for that. + +132 +00:08:42,000 --> 00:08:51,000 +I'm just going to the test case and we have like maximize browser for that. + +133 +00:08:51,000 --> 00:08:57,000 +We can write Driver Dot Maximize Window. + +134 +00:08:58,000 --> 00:09:02,000 +And that is a method which is placed in the Chrome class. + +135 +00:09:02,000 --> 00:09:04,000 +We are calling that method by its object. + +136 +00:09:04,000 --> 00:09:05,000 +So that's my object. + +137 +00:09:05,000 --> 00:09:10,000 +And we're calling this maximize window method, maximize the window method. + +138 +00:09:11,000 --> 00:09:13,000 +Now I'm going to execute. + +139 +00:09:13,000 --> 00:09:16,000 +So it should maximize browser. + +140 +00:09:17,000 --> 00:09:24,000 +I'm just waiting for browser to be started, and that is going to be maximized. + +141 +00:09:25,000 --> 00:09:26,000 +So that is maximized. + +142 +00:09:28,000 --> 00:09:31,000 +So now we have maximized it, I can move to the next step. + diff --git a/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/003 Work on TextBox Enter data into textbox_en.srt b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/003 Work on TextBox Enter data into textbox_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..25658947657d94c25d2b9777c4bcc4d2ef607c96 --- /dev/null +++ b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/003 Work on TextBox Enter data into textbox_en.srt @@ -0,0 +1,304 @@ +1 +00:00:02,000 --> 00:00:04,000 +Next step is we want to work on the text box. + +2 +00:00:05,000 --> 00:00:08,000 +I'll show you how we can work on text boxes. + +3 +00:00:09,000 --> 00:00:13,000 +Step four would be work on X-Box. + +4 +00:00:13,000 --> 00:00:15,000 +We can enter data into the text box. + +5 +00:00:15,000 --> 00:00:17,000 +We can clear data from the text box. + +6 +00:00:17,000 --> 00:00:19,000 +So how we can do that, I'll just come over here. + +7 +00:00:20,000 --> 00:00:28,000 +So I'm just coming here and data to the text box. + +8 +00:00:29,000 --> 00:00:37,000 +Now I'm just moving to my application, and we know that for performing any task on any element, first, + +9 +00:00:37,000 --> 00:00:41,000 +we need to locate it, that we have seen the previous session, how we can locate elements. + +10 +00:00:42,000 --> 00:00:47,000 +So I just right click on this inspect and we are going to get different locators. + +11 +00:00:47,000 --> 00:00:53,000 +So here, if you check it, here we are getting it name so I can locate an element by its name. + +12 +00:00:53,000 --> 00:00:54,000 +So I just copied that. + +13 +00:00:54,000 --> 00:01:00,000 +I'm S. Driver dot fine element by name. + +14 +00:01:00,000 --> 00:01:05,000 +And that's the name of the element and dot scent and the cookies. + +15 +00:01:06,000 --> 00:01:09,000 +That's the method for writing something on that text box. + +16 +00:01:09,000 --> 00:01:11,000 +So I'm saying like, Hello, world. + +17 +00:01:11,000 --> 00:01:12,000 +OK, that is done. + +18 +00:01:13,000 --> 00:01:16,000 +I'm just executing it. + +19 +00:01:18,000 --> 00:01:20,000 +So if you execute this? + +20 +00:01:24,000 --> 00:01:30,000 +First browser started at WRAL, then maximize, then enter some data into the text box. + +21 +00:01:32,000 --> 00:01:37,000 +OK, in the same way, you can enter data into the next four text boxes. + +22 +00:01:37,000 --> 00:01:45,000 +So what I'm going to do just quickly find out locator of these elements and just putting some data into + +23 +00:01:45,000 --> 00:01:45,000 +that. + +24 +00:01:45,000 --> 00:01:48,000 +So that's the second element. + +25 +00:01:49,000 --> 00:01:54,000 +And here the name is, we can use name, we can use any other locator. + +26 +00:01:54,000 --> 00:01:57,000 +So as of now, it's easy for me to find out the names. + +27 +00:01:57,000 --> 00:02:00,000 +I'm just going for that and it will be a good practice. + +28 +00:02:00,000 --> 00:02:03,000 +If you're writing here, you can use any of the look at it like you can use. + +29 +00:02:03,000 --> 00:02:05,000 +But OK, I try to use the spot as well. + +30 +00:02:05,000 --> 00:02:12,000 +So Driver Dot find element by X spot and I'm writing the but like we have seen these techniques, so + +31 +00:02:12,000 --> 00:02:14,000 +just directly writing it. + +32 +00:02:16,000 --> 00:02:20,000 +Input at name is equal to that's the value. + +33 +00:02:21,000 --> 00:02:21,000 +And what do you want to do? + +34 +00:02:22,000 --> 00:02:29,000 +I want to enter some data, so I'm entering Lake ABCDE Street, Yahoo dot com or I can give my email + +35 +00:02:29,000 --> 00:02:37,000 +ID like testing word India at the red Gmail dot com. + +36 +00:02:39,000 --> 00:02:42,000 +So that's a step too in the same way I can go to the third step. + +37 +00:02:43,000 --> 00:02:56,000 +So that's my password box and I'm going to use name here, so try word dot, find element by name and + +38 +00:02:56,000 --> 00:02:57,000 +dot. + +39 +00:02:57,000 --> 00:02:58,000 +Send GIFs. + +40 +00:02:58,000 --> 00:03:03,000 +I'm putting the password like ABCD one two three, then I'll go to the forgot password. + +41 +00:03:03,000 --> 00:03:05,000 +So that's my forgot password. + +42 +00:03:06,000 --> 00:03:07,000 +And that's my name. + +43 +00:03:07,000 --> 00:03:09,000 +Name of that element. + +44 +00:03:09,000 --> 00:03:13,000 +So dry word dot find element by name again. + +45 +00:03:13,000 --> 00:03:16,000 +So you can go to any element locator. + +46 +00:03:16,000 --> 00:03:19,000 +I'm just going for the name because it is easy to find over here. + +47 +00:03:19,000 --> 00:03:21,000 +I'm just giving ABCD one two three. + +48 +00:03:22,000 --> 00:03:30,000 +One thing I want to show you over here like I have entered Hello World here in username and I want to + +49 +00:03:30,000 --> 00:03:30,000 +change it. + +50 +00:03:30,000 --> 00:03:38,000 +So what I am doing on the line number 12 here on this line, which is line number 12, we have entered + +51 +00:03:38,000 --> 00:03:38,000 +Hello World. + +52 +00:03:39,000 --> 00:03:39,000 +No. + +53 +00:03:40,000 --> 00:03:44,000 +I'm writing it again and I'm putting ABCD one two three. + +54 +00:03:44,000 --> 00:03:46,000 +Now what is going to happen? + +55 +00:03:46,000 --> 00:03:48,000 +Because first this line will execute. + +56 +00:03:48,000 --> 00:03:53,000 +It will enter Hello World when the line number 16 will execute, it will enter ABCD one two three. + +57 +00:03:53,000 --> 00:04:01,000 +So this DICT is going to append with the first text or it will going to overwrite actually by default + +58 +00:04:01,000 --> 00:04:02,000 +is going to appended. + +59 +00:04:03,000 --> 00:04:04,000 +So let me show you. + +60 +00:04:06,000 --> 00:04:12,000 +And it will upend fast, it will write Helen and then ABCD one, two three. + +61 +00:04:12,000 --> 00:04:13,000 +So let me show you. + +62 +00:04:18,000 --> 00:04:20,000 +So if you check it over here. + +63 +00:04:20,000 --> 00:04:22,000 +Hello, World and ABCD one, two three. + +64 +00:04:23,000 --> 00:04:30,000 +Now the task is I want to clear the previous text, which is written like Halyard and then enter the + +65 +00:04:30,000 --> 00:04:33,000 +new text when you want to clear the previous text. + +66 +00:04:33,000 --> 00:04:36,000 +We can use, I'm just locating that element. + +67 +00:04:37,000 --> 00:04:38,000 +And we have a method with the name clear. + +68 +00:04:39,000 --> 00:04:42,000 +So that is going to clear the existing text of the text box. + +69 +00:04:42,000 --> 00:04:44,000 +And now we're going to enter. + +70 +00:04:44,000 --> 00:04:45,000 +Let me show you now. + +71 +00:04:51,000 --> 00:04:59,000 +Browsers started you are entered maximize this time, if you notice it has removed remote hello world + +72 +00:04:59,000 --> 00:05:01,000 +and just a 1-2-3. + +73 +00:05:02,000 --> 00:05:06,000 +So we have seen two common methods which we are going to use on the text boxes. + +74 +00:05:07,000 --> 00:05:13,000 +One is send underscore keys and other what is clear, which is going to clear data of the text box. + +75 +00:05:14,000 --> 00:05:15,000 +So here we here perform. + +76 +00:05:16,000 --> 00:05:19,000 +Next step where we enter data into the text box. + diff --git a/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/004 Work on Radio Button Checkbox Link Button_en.srt b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/004 Work on Radio Button Checkbox Link Button_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..cbd3fb72b9079454e112c7e4b32ae29946a3ae5b --- /dev/null +++ b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/004 Work on Radio Button Checkbox Link Button_en.srt @@ -0,0 +1,424 @@ +1 +00:00:00,000 --> 00:00:02,000 +Next, I'll show you how we can work on the radio button. + +2 +00:00:03,000 --> 00:00:05,000 +So now I'm moving to the step five. + +3 +00:00:08,000 --> 00:00:14,000 +To click on the radio button and working on radio button is quite similar to any button, we just need + +4 +00:00:14,000 --> 00:00:14,000 +to click it. + +5 +00:00:14,000 --> 00:00:16,000 +But before that, we need to look at it. + +6 +00:00:17,000 --> 00:00:19,000 +So I'm just moving to my application + +7 +00:00:21,000 --> 00:00:26,000 +and I want to work on this radio button, which is home. + +8 +00:00:26,000 --> 00:00:28,000 +So I just click on this inspect. + +9 +00:00:31,000 --> 00:00:39,000 +Now, it's an input type where value is equal to home, so I can use this, I'm going to generate export + +10 +00:00:39,000 --> 00:00:39,000 +for this. + +11 +00:00:40,000 --> 00:00:49,000 +So what I'm doing here working on radio button and. + +12 +00:00:51,000 --> 00:00:51,000 +No. + +13 +00:00:52,000 --> 00:01:01,000 +So again, steps are to divert dot finite element by X spot, and my X path would be, I'm just checking + +14 +00:01:01,000 --> 00:01:04,000 +it again input and the value is equal to home. + +15 +00:01:04,000 --> 00:01:06,000 +So I'm saying input. + +16 +00:01:10,000 --> 00:01:19,000 +And attribute, I'm going to use value before value, I'm just ready to edit it home. + +17 +00:01:19,000 --> 00:01:21,000 +And what do you want to do on that? + +18 +00:01:21,000 --> 00:01:22,000 +So I just want to click on it. + +19 +00:01:23,000 --> 00:01:26,000 +So just click no again. + +20 +00:01:26,000 --> 00:01:27,000 +I'm going to execute. + +21 +00:01:27,000 --> 00:01:35,000 +So let me show you it will start browser, enter some data into the text boxes and then click on a radio + +22 +00:01:35,000 --> 00:01:35,000 +button. + +23 +00:01:40,000 --> 00:01:46,000 +If you check it out here, it is clicked on home in the same way if I want to click on the office, + +24 +00:01:47,000 --> 00:01:50,000 +so I'm just inspecting that so that we can check. + +25 +00:01:51,000 --> 00:01:52,000 +It's just a locator. + +26 +00:01:52,000 --> 00:01:52,000 +We need to find out. + +27 +00:01:53,000 --> 00:01:54,000 +We can work on any element. + +28 +00:01:55,000 --> 00:02:01,000 +So I'm just coming over here and I want to work on second radio button. + +29 +00:02:02,000 --> 00:02:04,000 +The value is different, so what I can do. + +30 +00:02:06,000 --> 00:02:11,000 +Rather than going for home, just going for office radio button. + +31 +00:02:11,000 --> 00:02:14,000 +So if we check it over here, I just change my spot. + +32 +00:02:18,000 --> 00:02:20,000 +Going to execute again. + +33 +00:02:28,000 --> 00:02:34,000 +And here, textbooks, and then it worked on that radio button. + +34 +00:02:35,000 --> 00:02:39,000 +So we have worked on the radio button now. + +35 +00:02:39,000 --> 00:02:43,000 +Next step is to work on the checkbox, working on the checkbox. + +36 +00:02:43,000 --> 00:02:50,000 +It's seem like here we just need to click on that. + +37 +00:02:50,000 --> 00:02:55,000 +So again, we need to look at element and perform click operation on that for locating element. + +38 +00:02:55,000 --> 00:02:58,000 +I'm just going to the checkbox Inspect. + +39 +00:03:02,000 --> 00:03:09,000 +So here, input and name is equal to terms I can use name or I can generate exports, I'm just writing + +40 +00:03:09,000 --> 00:03:15,000 +like now, this time I'm going to work on. + +41 +00:03:17,000 --> 00:03:25,000 +Working on Check Box again, driver dot, find element by name or expert. + +42 +00:03:25,000 --> 00:03:29,000 +You can use anything, I'm just going to use name this time. + +43 +00:03:29,000 --> 00:03:31,000 +And the name he is dums. + +44 +00:03:32,000 --> 00:03:37,000 +So why an element by by name? + +45 +00:03:37,000 --> 00:03:38,000 +And that's the name. + +46 +00:03:38,000 --> 00:03:39,000 +Andy, what do you want to do? + +47 +00:03:39,000 --> 00:03:40,000 +I just want to click on that. + +48 +00:03:42,000 --> 00:03:48,000 +Then so this time it will click on the check box as well. + +49 +00:03:56,000 --> 00:04:03,000 +Here first radio button at the bottom, if you take it over here, that's a checkbox. + +50 +00:04:04,000 --> 00:04:08,000 +Now I want to click on the sign up button, but as we click on the sign up button, it will show this + +51 +00:04:08,000 --> 00:04:10,000 +message because that's a mandatory fill. + +52 +00:04:11,000 --> 00:04:16,000 +So I just click on the sign up button and if we get this message means yes, it is able to click on + +53 +00:04:16,000 --> 00:04:16,000 +the sign up button. + +54 +00:04:17,000 --> 00:04:20,000 +So I'm just clicking on button, so I'm just going to work on the button. + +55 +00:04:21,000 --> 00:04:25,000 +So work on button and the approach is simple. + +56 +00:04:25,000 --> 00:04:27,000 +Just look at that element and click on it. + +57 +00:04:27,000 --> 00:04:29,000 +So again, I'm just coming here. + +58 +00:04:33,000 --> 00:04:39,000 +And value is equal to sign up or Typekit equal to summit so I can use any element locator, I'm just + +59 +00:04:39,000 --> 00:04:45,000 +going for the spot driver dot find element by expert input. + +60 +00:04:46,000 --> 00:04:52,000 +And I'm saying at the right type is equal to submit, so you must be aware about how we can go for these + +61 +00:04:52,000 --> 00:04:53,000 +elemental locators. + +62 +00:04:53,000 --> 00:04:59,000 +And for that, you can check out other videos where we're explaining elemental creators. + +63 +00:05:00,000 --> 00:05:01,000 +So I just want to go for the click on this. + +64 +00:05:02,000 --> 00:05:04,000 +Now I'm just running it. + +65 +00:05:10,000 --> 00:05:13,000 +Brother started maximize. + +66 +00:05:17,000 --> 00:05:19,000 +You are entered maximize. + +67 +00:05:24,000 --> 00:05:30,000 +Then doing the task, and if you check it, we are getting this message means it, click on the sign + +68 +00:05:30,000 --> 00:05:30,000 +up button. + +69 +00:05:31,000 --> 00:05:38,000 +But because all the mandatory fields are not set, it is not able to sign up now at the end, I can + +70 +00:05:38,000 --> 00:05:39,000 +go to this link. + +71 +00:05:40,000 --> 00:05:42,000 +So here we have seen if I go. + +72 +00:05:43,000 --> 00:05:47,000 +So here we have seen how we can work on work on textbooks, how we can work on the radio button, how + +73 +00:05:47,000 --> 00:05:50,000 +we can work on checkbox also. + +74 +00:05:50,000 --> 00:05:53,000 +So we have seen how we can work on the button. + +75 +00:05:56,000 --> 00:05:59,000 +Now, I'll show you how we can work on links. + +76 +00:05:59,000 --> 00:06:06,000 +So again, link up similar to button, radio button or checkbox, we just need to click on that something. + +77 +00:06:06,000 --> 00:06:07,000 +Click on Link. + +78 +00:06:08,000 --> 00:06:10,000 +I'll show you that will be the same approach. + +79 +00:06:10,000 --> 00:06:13,000 +I'm just coming here, and that's the link. + +80 +00:06:13,000 --> 00:06:15,000 +I can check it, ex-chairman. + +81 +00:06:17,000 --> 00:06:17,000 +It's a. + +82 +00:06:19,000 --> 00:06:23,000 +There's a type of element it means anger that is used for link. + +83 +00:06:23,000 --> 00:06:26,000 +So we can look it linked by its text. + +84 +00:06:26,000 --> 00:06:35,000 +So what I'm doing just here, I'm just doing here, like work on. + +85 +00:06:38,000 --> 00:06:39,000 +Link. + +86 +00:06:39,000 --> 00:06:48,000 +So I'm writing like Driver Dot, find element by link text and the text and what you want to do. + +87 +00:06:48,000 --> 00:06:49,000 +I just want to click on it. + +88 +00:06:50,000 --> 00:06:53,000 +So now I'm executing one more time. + +89 +00:06:57,000 --> 00:07:02,000 +And this time you will notice it will click on Link as well. + +90 +00:07:08,000 --> 00:07:16,000 +Rather, started you maximize doing the task on the text box, and if you check it here, it clicks + +91 +00:07:16,000 --> 00:07:19,000 +on the link as well as we click. + +92 +00:07:19,000 --> 00:07:21,000 +It is moving just as no windows open. + +93 +00:07:22,000 --> 00:07:23,000 +It is just moving up. + +94 +00:07:23,000 --> 00:07:25,000 +So if you check it out with him, you're not getting any other means. + +95 +00:07:25,000 --> 00:07:27,000 +It is working on the link as well. + +96 +00:07:28,000 --> 00:07:32,000 +And at the end, so we have you seen work on different type of element at the end. + +97 +00:07:33,000 --> 00:07:35,000 +I want to close my browser. + +98 +00:07:36,000 --> 00:07:37,000 +So close. + +99 +00:07:39,000 --> 00:07:50,000 +Browser, I'm just coming here, but I work dot growth so that the N26 will be starting browser doing + +100 +00:07:50,000 --> 00:07:51,000 +the task on the different elements. + +101 +00:07:51,000 --> 00:07:55,000 +And at the end, once the test gets is over, I'll just close browser. + +102 +00:08:02,000 --> 00:08:06,000 +So here, working on the text box, then link and then close. + +103 +00:08:07,000 --> 00:08:15,000 +So that's my N26, where we have seen how we can work on different type of elements using selenium and + +104 +00:08:15,000 --> 00:08:21,000 +python to first of all, we have to set up selenium and then we can work on different type of elements. + +105 +00:08:22,000 --> 00:08:23,000 +That's all we have. + +106 +00:08:23,000 --> 00:08:24,000 +Thanks for watching this video. + diff --git a/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/005 Work on Dropdown or List Select values from list of Dropdown_en.srt b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/005 Work on Dropdown or List Select values from list of Dropdown_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..63e2457117d23b533dfc5198cafcacd673f68bb0 --- /dev/null +++ b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/005 Work on Dropdown or List Select values from list of Dropdown_en.srt @@ -0,0 +1,384 @@ +1 +00:00:01,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +In this session, I'll show you how we can work on problem or list. + +3 +00:00:09,000 --> 00:00:13,000 +First of all, we need to understand the difference between drop. + +4 +00:00:13,000 --> 00:00:17,000 +Don't invest in drop, don't we can select only one value. + +5 +00:00:17,000 --> 00:00:20,000 +And in this, we can select more than one values. + +6 +00:00:21,000 --> 00:00:31,000 +So if I show you my application and first of all, I'm just going to double down if I go and see the + +7 +00:00:31,000 --> 00:00:32,000 +estimate of that. + +8 +00:00:33,000 --> 00:00:40,000 +So if that is started with the select means, the tag is selected by that we can identify yes, it's + +9 +00:00:40,000 --> 00:00:43,000 +a dropdown or list if it allowed to select only one data. + +10 +00:00:44,000 --> 00:00:47,000 +It will be a dropdown if it's allowed to select multiple data. + +11 +00:00:48,000 --> 00:00:50,000 +It will be a list, but as of now it allowed select only one data. + +12 +00:00:51,000 --> 00:00:52,000 +So it's a dropdown. + +13 +00:00:53,000 --> 00:00:58,000 +Now I want to select value from the dropdown, so I'm just moving to my desk first. + +14 +00:00:59,000 --> 00:01:04,000 +And here we need to import, import, select class. + +15 +00:01:04,000 --> 00:01:17,000 +So I'm reading like from Selenium Web Driver Dot Support Dot Select from this module, I want to import + +16 +00:01:18,000 --> 00:01:20,000 +select class. + +17 +00:01:20,000 --> 00:01:26,000 +So whenever you are working on dropdown or list, first of all, we need to import this select class. + +18 +00:01:27,000 --> 00:01:28,000 +No hand. + +19 +00:01:28,000 --> 00:01:34,000 +If I remember first, we are working on the text box, then radio button and here I want to work on + +20 +00:01:34,000 --> 00:01:35,000 +the dropdown. + +21 +00:01:35,000 --> 00:01:40,000 +So work on drop down. + +22 +00:01:42,000 --> 00:01:47,000 +Whenever you want to work on the dropdown, we need to create object or to select class, or I'm creating + +23 +00:01:47,000 --> 00:01:51,000 +objects like Object Select. + +24 +00:01:52,000 --> 00:01:56,000 +But the point is which dropdown you want to use. + +25 +00:01:57,000 --> 00:02:02,000 +Because here if you notice we have multiple dropdown, but I want to use this dropdown to, we have + +26 +00:02:02,000 --> 00:02:02,000 +to look at it. + +27 +00:02:03,000 --> 00:02:06,000 +I'm just going to attach DML. + +28 +00:02:07,000 --> 00:02:19,000 +So if we check it here, name is equal to six so I can use that I can located by Driver Dot, find element + +29 +00:02:19,000 --> 00:02:21,000 +by name, and that's my name. + +30 +00:02:22,000 --> 00:02:25,000 +So I'm locating drop down by using this element locator. + +31 +00:02:25,000 --> 00:02:30,000 +So now we have created object of the select class no object. + +32 +00:02:30,000 --> 00:02:34,000 +We have three options by which we can select any value. + +33 +00:02:35,000 --> 00:02:38,000 +First of all, I'm going to select by the index. + +34 +00:02:38,000 --> 00:02:44,000 +So if you notice I'm just coming to the application, I'm just closing this and refreshing my page. + +35 +00:02:45,000 --> 00:02:49,000 +So whenever this page loads, we're not getting any value selected. + +36 +00:02:49,000 --> 00:02:52,000 +So I want to select the second value, which is mail. + +37 +00:02:53,000 --> 00:02:59,000 +So what we think we can select and evaluate index an index always start from zero zero indexed. + +38 +00:02:59,000 --> 00:03:02,000 +We have Jews gender on one index. + +39 +00:03:02,000 --> 00:03:15,000 +We have M. So I'm saying I want to select value by select by index, and my index is one. + +40 +00:03:15,000 --> 00:03:17,000 +I'm just commenting this right. + +41 +00:03:17,000 --> 00:03:17,000 +We're not close. + +42 +00:03:18,000 --> 00:03:19,000 +I don't want to close browser. + +43 +00:03:20,000 --> 00:03:25,000 +And also I'm just commenting this submit button. + +44 +00:03:26,000 --> 00:03:28,000 +So now we'll come and pick these two lines. + +45 +00:03:30,000 --> 00:03:31,000 +I'm just executing this. + +46 +00:03:34,000 --> 00:03:35,000 +Browsers started. + +47 +00:03:40,000 --> 00:03:41,000 +And dirty little. + +48 +00:03:44,000 --> 00:03:45,000 +Maximized. + +49 +00:03:47,000 --> 00:03:57,000 +If you check it here, mail is selected, so I want to show like this time I'm passing my indexes to + +50 +00:03:57,000 --> 00:03:59,000 +so it should select female. + +51 +00:04:00,000 --> 00:04:02,000 +I'm just executing one more time. + +52 +00:04:03,000 --> 00:04:09,000 +So yeah, so we have seen first approach to select any value by index. + +53 +00:04:15,000 --> 00:04:17,000 +Here, if you notice female females selected. + +54 +00:04:19,000 --> 00:04:23,000 +So first approach to select any value bite index. + +55 +00:04:25,000 --> 00:04:27,000 +I'm just commenting it out. + +56 +00:04:30,000 --> 00:04:32,000 +So that the first approach? + +57 +00:04:33,000 --> 00:04:38,000 +No, I'm going to tell you second approach, I'm going to select bite value. + +58 +00:04:38,000 --> 00:04:39,000 +So what do you mean by the select by value? + +59 +00:04:41,000 --> 00:04:44,000 +I'm just coming here and if you see the estimable. + +60 +00:04:48,000 --> 00:04:54,000 +Here that Jamal, I just expand this, and for each option, we have a value. + +61 +00:04:54,000 --> 00:05:05,000 +So if I want to select female relatives too, so I'm just coming here, o'bagy select by value and my + +62 +00:05:05,000 --> 00:05:11,000 +value is to one thing that we notice whenever we are going for the index, it's a numeric. + +63 +00:05:11,000 --> 00:05:16,000 +But whenever we are going for value, it's string, so we need to write in double quotes. + +64 +00:05:17,000 --> 00:05:18,000 +OK. + +65 +00:05:18,000 --> 00:05:24,000 +I'm just running it again, so it will start a new browser and it should select female because value + +66 +00:05:24,000 --> 00:05:25,000 +of the female is to. + +67 +00:05:27,000 --> 00:05:30,000 +So there's a second approach to select data in the dropdown. + +68 +00:05:32,000 --> 00:05:33,000 +I'm just coming here. + +69 +00:05:36,000 --> 00:05:39,000 +And that is second, which is selected. + +70 +00:05:41,000 --> 00:05:43,000 +So now we have seen two approaches. + +71 +00:05:43,000 --> 00:05:48,000 +Third approach could be we can select any value by the data. + +72 +00:05:48,000 --> 00:05:54,000 +So here, if you want to select M. so we can select by text, which is male. + +73 +00:05:54,000 --> 00:05:56,000 +So what are the visible text over here? + +74 +00:05:56,000 --> 00:05:57,000 +So I'm going. + +75 +00:05:58,000 --> 00:06:00,000 +And that's the second approach we have seen. + +76 +00:06:01,000 --> 00:06:07,000 +I'm coming to the third approach object select by visible text. + +77 +00:06:07,000 --> 00:06:12,000 +So we have seen three approaches index value, invisible text and visible text. + +78 +00:06:12,000 --> 00:06:14,000 +Is this time I want to select male. + +79 +00:06:15,000 --> 00:06:24,000 +OK, I'm just going to execute this, and this time it should select a male in that dropdown. + +80 +00:06:30,000 --> 00:06:39,000 +As it is done here, if you notice that is male, so we have seen how we can work on drop down and we + +81 +00:06:39,000 --> 00:06:41,000 +have the three approaches for that. + +82 +00:06:41,000 --> 00:06:47,000 +One is in next, either one is value and third one is visible text. + +83 +00:06:50,000 --> 00:06:55,000 +Now, if you want to, you can use our other dropdowns like you can select country, you can select + +84 +00:06:55,000 --> 00:07:00,000 +state, you can select city, we can apply this approach on the other dropdown as well. + +85 +00:07:02,000 --> 00:07:05,000 +As of now, we have seen we can select value in the problem. + +86 +00:07:06,000 --> 00:07:13,000 +Same approach can be used when we are working on the list, but we have some more options like these + +87 +00:07:13,000 --> 00:07:19,000 +select value so we can go for this liquid index, this by value and this liquid visible text. + +88 +00:07:19,000 --> 00:07:24,000 +And also, we had the option of these select all but these options can be used when you are working + +89 +00:07:24,000 --> 00:07:24,000 +on the list. + +90 +00:07:25,000 --> 00:07:29,000 +These options are not going to work on dropdown, but when we are selecting. + +91 +00:07:31,000 --> 00:07:37,000 +As we know in, we can select more than one values, so I think an example we have selected for values + +92 +00:07:38,000 --> 00:07:44,000 +and out of four, I want to select one so I can go for the district by value index or visible text or + +93 +00:07:44,000 --> 00:07:49,000 +if I go for this list all so it will remove all the selected items. + +94 +00:07:49,000 --> 00:07:54,000 +So that said, be selected, but we can use this list when we are working on the list only. + +95 +00:07:56,000 --> 00:08:01,000 +So here we have seen how we can work on dropdown or list. + +96 +00:08:02,000 --> 00:08:06,000 +That's all we have for the session tanks watching this video. + diff --git a/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/006 Execute Test Case on Firefox Browser (Cross Browser Testing)_en.srt b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/006 Execute Test Case on Firefox Browser (Cross Browser Testing)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..bc82bf82a4a2247fca6fe2f501fe6ba4ec2029af --- /dev/null +++ b/32 - Let's Start Writing Test Case in Selenium WebDriver Must for Everyone/006 Execute Test Case on Firefox Browser (Cross Browser Testing)_en.srt @@ -0,0 +1,180 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:07,000 +So previously, we have seen how we can execute our test case on the Chrome browser. + +3 +00:00:08,000 --> 00:00:16,000 +This time, I'll show you how we can execute my selenium with Python test kits on Firefox browser. + +4 +00:00:17,000 --> 00:00:23,000 +First of all, I'm going to the test case, and here we set both of the Chrome browser. + +5 +00:00:24,000 --> 00:00:30,000 +You've seen the exact Chrome driver, which is behaving as an interface between the test kits and browser, + +6 +00:00:31,000 --> 00:00:34,000 +and hit also your trading object of the Chrome class. + +7 +00:00:34,000 --> 00:00:40,000 +I want to execute on the Firefox, so I just copied this and going to create one more test kits. + +8 +00:00:40,000 --> 00:00:43,000 +This time I'm just giving the name like Firefox. + +9 +00:00:44,000 --> 00:00:46,000 +I'll make changes in this test gizmo. + +10 +00:00:47,000 --> 00:00:50,000 +So first of all, on place of Chrome, we need to import Firefox. + +11 +00:00:50,000 --> 00:00:55,000 +I'm writing like Firefox now here. + +12 +00:00:55,000 --> 00:01:04,000 +Also, we need to get Firefox and this driver part before we are giving this driver part, which is + +13 +00:01:04,000 --> 00:01:05,000 +the Chrome browser. + +14 +00:01:05,000 --> 00:01:08,000 +But I need to give part of Firefox Driver. + +15 +00:01:08,000 --> 00:01:10,000 +So I'm just moving to the browser. + +16 +00:01:10,000 --> 00:01:18,000 +I'm going to the Google and download this driver name of Firefox browser is Gecko Driver, something + +17 +00:01:19,000 --> 00:01:29,000 +Gecko driver for Firefox, and it shows that the Gecko driver location. + +18 +00:01:32,000 --> 00:01:35,000 +I'm going to download it for Windows 64bit. + +19 +00:01:39,000 --> 00:01:42,000 +Let it download it will be JIP file. + +20 +00:01:42,000 --> 00:01:45,000 +We need to ingest that and then we need to give. + +21 +00:01:45,000 --> 00:01:47,000 +But here on this place. + +22 +00:01:48,000 --> 00:01:52,000 +So we have seen this case would be seen only just for the Firefox. + +23 +00:01:53,000 --> 00:01:56,000 +We just need to import Firefox class plus. + +24 +00:01:56,000 --> 00:02:04,000 +Then we need to create object of the Firefox and give both of the Firefox Eggsy, which is a gecko driver + +25 +00:02:04,000 --> 00:02:05,000 +that is downloaded. + +26 +00:02:06,000 --> 00:02:08,000 +I just moved to the location. + +27 +00:02:08,000 --> 00:02:13,000 +Unzip that and get that and moved to that folder, so just copy this address. + +28 +00:02:15,000 --> 00:02:18,000 +Now going to test gas and. + +29 +00:02:19,000 --> 00:02:22,000 +Now I'm giving the part of this decoder out not easy. + +30 +00:02:23,000 --> 00:02:29,000 +And we know that to give, but it feels backward, fresh, used, double backwards slash. + +31 +00:02:34,000 --> 00:02:35,000 +Just save it. + +32 +00:02:36,000 --> 00:02:40,000 +Rest of the things are seem for execution, we know how we can go forward. + +33 +00:02:40,000 --> 00:02:42,000 +Just right click event. + +34 +00:02:42,000 --> 00:02:47,000 +First, death, just five folks as we execute. + +35 +00:02:47,000 --> 00:02:56,000 +This time it should trigger Firefox browser and do all their duties on that browser is triggered. + +36 +00:02:58,000 --> 00:03:04,000 +It enters the ear and then it's going to perform different tasks. + +37 +00:03:04,000 --> 00:03:08,000 +If you notice it is entering data into the different text boxes. + +38 +00:03:11,000 --> 00:03:17,000 +So here we have seen how we can execute the same test case, which you executed before on the Chrome + +39 +00:03:17,000 --> 00:03:17,000 +browser. + +40 +00:03:17,000 --> 00:03:23,000 +Now we are executing on the Firefox browser, so that's a minor changes we need to do on the different + +41 +00:03:23,000 --> 00:03:23,000 +browsers. + +42 +00:03:24,000 --> 00:03:28,000 +Best guess God would be in this session. + +43 +00:03:28,000 --> 00:03:32,000 +We have seen how we can execute best gift on the Firefox browser. + +44 +00:03:33,000 --> 00:03:34,000 +That's all we have for the session. + +45 +00:03:35,000 --> 00:03:36,000 +Thanks for watching this video. + diff --git a/33 - Keyboard & Mouse Operations ActionChains Class/001 Perform Keyboard Operations Press Single Key, Multiple Keys_en.srt b/33 - Keyboard & Mouse Operations ActionChains Class/001 Perform Keyboard Operations Press Single Key, Multiple Keys_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..53da7295170ee1e19acb4871502560e345c47b27 --- /dev/null +++ b/33 - Keyboard & Mouse Operations ActionChains Class/001 Perform Keyboard Operations Press Single Key, Multiple Keys_en.srt @@ -0,0 +1,556 @@ +1 +00:00:00,000 --> 00:00:06,000 +Welcome to the testing world in this session, I'm going to cover one of the most important flaws with + +2 +00:00:06,000 --> 00:00:08,000 +the name action genes. + +3 +00:00:09,000 --> 00:00:16,000 +If you are aware about selenium with Java, we have the same class with the name actions over there. + +4 +00:00:17,000 --> 00:00:20,000 +So first of all, we need to understand what the use of action genes. + +5 +00:00:21,000 --> 00:00:29,000 +If you want to perform any keyboard action or mouse action like I'm working on my application, I just + +6 +00:00:29,000 --> 00:00:33,000 +I just open my application and here I enter some user name. + +7 +00:00:33,000 --> 00:00:38,000 +In many cases, you will notice after entering the username, I press tab. + +8 +00:00:38,000 --> 00:00:42,000 +So the tab, which you are pressing, is a keyboard operation. + +9 +00:00:43,000 --> 00:00:48,000 +So if you are using a keyboard over here, I was just putting some email over here. + +10 +00:00:48,000 --> 00:00:54,000 +After that, you want to perform, control a control for select all. + +11 +00:00:54,000 --> 00:00:56,000 +This is a gimmick keyboard operation. + +12 +00:00:57,000 --> 00:01:04,000 +So wherever you want to perform keyboard operation, we can use the class with any action genes in the + +13 +00:01:04,000 --> 00:01:04,000 +same way. + +14 +00:01:05,000 --> 00:01:11,000 +We are going to use mouse on many places, like if you want to double click anywhere, I want to double + +15 +00:01:11,000 --> 00:01:12,000 +click on this button. + +16 +00:01:12,000 --> 00:01:14,000 +I won't right click on this button. + +17 +00:01:15,000 --> 00:01:20,000 +Or in many cases, you will notice I'll show you one more example. + +18 +00:01:23,000 --> 00:01:30,000 +In many cases, you will find menu are open by most over, it's not opening by click. + +19 +00:01:30,000 --> 00:01:36,000 +I'm just taking my mouth over there and as I take Mosul over there, it automatically open. + +20 +00:01:36,000 --> 00:01:38,000 +That is called mouth horror. + +21 +00:01:38,000 --> 00:01:39,000 +Here you are using mouth. + +22 +00:01:40,000 --> 00:01:42,000 +I just right click double click or moving my mouth. + +23 +00:01:42,000 --> 00:01:45,000 +So that kind of operations are called mouse operation. + +24 +00:01:46,000 --> 00:01:53,000 +So if you want to perform keyboard operation or mouse operation in selenium, we are going to use action + +25 +00:01:53,000 --> 00:01:56,000 +genes, glass hidden staining with Python. + +26 +00:01:57,000 --> 00:01:59,000 +So I'll show you how we can use that. + +27 +00:01:59,000 --> 00:02:06,000 +First of all, I'm moving to my project that I have created in the previous session, and that's a project, + +28 +00:02:06,000 --> 00:02:08,000 +and I'm going to create one more file here. + +29 +00:02:08,000 --> 00:02:11,000 +I'm seeing keyboard + +30 +00:02:13,000 --> 00:02:14,000 +operations. + +31 +00:02:15,000 --> 00:02:15,000 +Well, so what? + +32 +00:02:15,000 --> 00:02:16,000 +I'll show you keyboard operations. + +33 +00:02:16,000 --> 00:02:23,000 +A few lines would be common, like, first of all, from Selenium Dot Web Driver. + +34 +00:02:27,000 --> 00:02:34,000 +Import Graham, that the line one, No. + +35 +00:02:36,000 --> 00:02:45,000 +I want to create object of the current drivers, so driver is my object name and the chrome is the class. + +36 +00:02:46,000 --> 00:02:48,000 +And we know that we need to set the executable path. + +37 +00:02:48,000 --> 00:02:55,000 +Part of the file so you must have covered in the previous session, that was the part I was just copied. + +38 +00:02:55,000 --> 00:02:58,000 +That is a part of me. + +39 +00:02:59,000 --> 00:03:00,000 +Chrome private executable file. + +40 +00:03:01,000 --> 00:03:04,000 +And here we need to start like executable path is equal to path. + +41 +00:03:05,000 --> 00:03:07,000 +As this line will execute, it will start browser. + +42 +00:03:07,000 --> 00:03:10,000 +I want to enter you URLs or driver dot. + +43 +00:03:11,000 --> 00:03:22,000 +Get an entity b w w w the testing word dot com forward slash testing. + +44 +00:03:22,000 --> 00:03:23,000 +That's my application. + +45 +00:03:23,000 --> 00:03:26,000 +So application will be open once the application will be open. + +46 +00:03:29,000 --> 00:03:30,000 +I'm just moving to the application. + +47 +00:03:31,000 --> 00:03:34,000 +So the application will be open was the application would be open. + +48 +00:03:35,000 --> 00:03:39,000 +I want to enter username, then I want to press tab. + +49 +00:03:39,000 --> 00:03:41,000 +So first of all, I want to enter username. + +50 +00:03:42,000 --> 00:03:43,000 +I want to look at this element. + +51 +00:03:44,000 --> 00:03:46,000 +So right click and inspect. + +52 +00:03:48,000 --> 00:03:54,000 +He had name is equal to this, I just copied this drive word dot find. + +53 +00:03:57,000 --> 00:03:59,000 +Element by name. + +54 +00:04:01,000 --> 00:04:02,000 +And that's my name. + +55 +00:04:03,000 --> 00:04:06,000 +And what I want to do, I just want to perform send keys. + +56 +00:04:07,000 --> 00:04:08,000 +Hello. + +57 +00:04:08,000 --> 00:04:10,000 +So that is username, which will be entered. + +58 +00:04:11,000 --> 00:04:15,000 +Now I want to make it tab so that my control will switch to the password box. + +59 +00:04:17,000 --> 00:04:19,000 +I won't perform some keyboard operations. + +60 +00:04:19,000 --> 00:04:21,000 +I won't use keys with my keyboard. + +61 +00:04:22,000 --> 00:04:25,000 +For that case, we can use the class with the name action genes. + +62 +00:04:25,000 --> 00:04:27,000 +But before that, we need to import it. + +63 +00:04:28,000 --> 00:04:29,000 +So from selenium + +64 +00:04:32,000 --> 00:04:41,000 +web driver Gallman Dot Action Genes, import action genes plus. + +65 +00:04:42,000 --> 00:04:46,000 +So first of all, whenever you want to use Action Genes Class, we need to import that. + +66 +00:04:47,000 --> 00:04:49,000 +And now we need to create object of that. + +67 +00:04:50,000 --> 00:04:54,000 +So I'm creating like AZT action genes. + +68 +00:04:54,000 --> 00:05:00,000 +But this action genes glass is going to work on the same browser, which is open, but driver object, + +69 +00:05:01,000 --> 00:05:02,000 +which is open here. + +70 +00:05:03,000 --> 00:05:10,000 +So we need to pass driver object here so that all the actions will be performed on the same browser, + +71 +00:05:10,000 --> 00:05:12,000 +which is open by that by that driver object. + +72 +00:05:13,000 --> 00:05:15,000 +Now what do you want to do? + +73 +00:05:15,000 --> 00:05:17,000 +I want to press tab. + +74 +00:05:18,000 --> 00:05:22,000 +So AZT dot send keys. + +75 +00:05:22,000 --> 00:05:28,000 +OK, now our keyboard can be divided into the type of keys. + +76 +00:05:29,000 --> 00:05:37,000 +One is called normal keys, which includes characters, alphabets and special keys. + +77 +00:05:38,000 --> 00:05:45,000 +And Presto, the keys like tab caps, lock shift control all and based on page up home. + +78 +00:05:45,000 --> 00:05:46,000 +These are called special keys. + +79 +00:05:47,000 --> 00:05:52,000 +So if you want to use the special keys, we have to import a class with the name keys. + +80 +00:05:53,000 --> 00:06:03,000 +So I'm coming here from Selenium Dot Web Driver Dot Gallman Dot Keys, Import Keys Plus. + +81 +00:06:05,000 --> 00:06:16,000 +No hit, I want to perform, Deb, which is a specialty so I can go for is dot and What You Want to + +82 +00:06:16,000 --> 00:06:17,000 +perform tab. + +83 +00:06:18,000 --> 00:06:23,000 +And at the end, we want to we need to call performative means, whatever the case we have defined over + +84 +00:06:23,000 --> 00:06:25,000 +here, just perform there. + +85 +00:06:26,000 --> 00:06:27,000 +So I'm just leaving like here. + +86 +00:06:27,000 --> 00:06:31,000 +Xenakis, Deb, I'm running here. + +87 +00:06:34,000 --> 00:06:35,000 +So it should. + +88 +00:06:39,000 --> 00:06:44,000 +Open browser, and you have to do things some task here. + +89 +00:06:44,000 --> 00:06:48,000 +And if you notice control is shifted to the No. + +90 +00:06:49,000 --> 00:06:53,000 +My control is on the e-mail, so that's a single cue you perform. + +91 +00:06:54,000 --> 00:06:56,000 +Now I'll tell you the combination of keys. + +92 +00:06:56,000 --> 00:06:58,000 +What do you mean by the combination of keys? + +93 +00:06:58,000 --> 00:06:58,000 +OK. + +94 +00:06:59,000 --> 00:07:05,000 +I'm going to enter some data here that I'm going to perform control e as you perform control e. + +95 +00:07:06,000 --> 00:07:12,000 +That means it is going to select data of that particular box. + +96 +00:07:14,000 --> 00:07:20,000 +Now I'm coming to perform this combination of keys to first of all, my control will be on the user + +97 +00:07:20,000 --> 00:07:26,000 +box because we have located that and will perform that action and we have entered some data into that. + +98 +00:07:27,000 --> 00:07:30,000 +Now I want to select data of that box. + +99 +00:07:31,000 --> 00:07:34,000 +So my control is still on the user username because we have just entered that. + +100 +00:07:35,000 --> 00:07:36,000 +Now go to the action plus. + +101 +00:07:36,000 --> 00:07:40,000 +So now I will use this a city dot. + +102 +00:07:40,000 --> 00:07:42,000 +OK, what action we want to perform? + +103 +00:07:43,000 --> 00:07:48,000 +So if you notice, first of all, I want to press control and then E! + +104 +00:07:48,000 --> 00:07:53,000 +To Control is used to select data from that text box something. + +105 +00:07:55,000 --> 00:07:57,000 +He down. + +106 +00:07:58,000 --> 00:07:59,000 +Vicky, you want to use. + +107 +00:07:59,000 --> 00:08:05,000 +So here we have already imported these glass, so we are going to use keys. + +108 +00:08:05,000 --> 00:08:07,000 +So I'm just coming here. + +109 +00:08:08,000 --> 00:08:10,000 +He's not controlled. + +110 +00:08:11,000 --> 00:08:19,000 +So first, I want to press my control key and just keep down means keep it down, then I'll go for. + +111 +00:08:20,000 --> 00:08:22,000 +Send guys E! + +112 +00:08:23,000 --> 00:08:27,000 +So control and E and at the end bottom. + +113 +00:08:29,000 --> 00:08:34,000 +So it is control, and it means I'm selecting data and performed it. + +114 +00:08:34,000 --> 00:08:34,000 +OK. + +115 +00:08:34,000 --> 00:08:40,000 +What I want to do here, I'll just use import time. + +116 +00:08:40,000 --> 00:08:46,000 +So I want to pause here for some time so that you can check it is working or not. + +117 +00:08:46,000 --> 00:08:47,000 +So time dot sleep. + +118 +00:08:48,000 --> 00:08:49,000 +How many seconds? + +119 +00:08:49,000 --> 00:08:52,000 +I'm saying for 10 seconds, everything is done. + +120 +00:08:52,000 --> 00:08:55,000 +I just run it. + +121 +00:08:58,000 --> 00:09:00,000 +So to start, Rosa. + +122 +00:09:01,000 --> 00:09:07,000 +And if you notice the data is selected over here, so it means, yes, this is working fine. + +123 +00:09:08,000 --> 00:09:12,000 +So in the same way we can perform any combination of GIS. + +124 +00:09:12,000 --> 00:09:17,000 +So whatever the combination you want to perform, like if I give an example, control or delete. + +125 +00:09:18,000 --> 00:09:25,000 +So if you can see it will be like, first of all, I'm just going for the easy control, then I'm going + +126 +00:09:25,000 --> 00:09:25,000 +for the key. + +127 +00:09:26,000 --> 00:09:29,000 +And he's got all. + +128 +00:09:31,000 --> 00:09:33,000 +And then Xenakis. + +129 +00:09:34,000 --> 00:09:40,000 +And because here in two cases, in these two cases, I want to keep it down. + +130 +00:09:41,000 --> 00:09:46,000 +Now I want to press delete Sookie's dot delete. + +131 +00:09:47,000 --> 00:09:48,000 +So here it. + +132 +00:09:48,000 --> 00:09:51,000 +In these two cases, I want to keep these two guys down. + +133 +00:09:51,000 --> 00:09:53,000 +Only after that performed delete. + +134 +00:09:53,000 --> 00:09:55,000 +So it will be a control archive. + +135 +00:09:55,000 --> 00:09:58,000 +Delete and perform this, it will perform the action. + +136 +00:09:59,000 --> 00:10:04,000 +So here in the situation, we have seen how we can perform activities by using keyboard. + +137 +00:10:05,000 --> 00:10:09,000 +And here we have seen how we can perform single and combination of keys. + +138 +00:10:10,000 --> 00:10:12,000 +That's all we have for the session. + +139 +00:10:12,000 --> 00:10:14,000 +Thanks for watching this video. + diff --git a/33 - Keyboard & Mouse Operations ActionChains Class/002 Perform Mouse Operations Left Click, Right Click, Double Click, Drag and Drop_en.srt b/33 - Keyboard & Mouse Operations ActionChains Class/002 Perform Mouse Operations Left Click, Right Click, Double Click, Drag and Drop_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..54ec46dcc1607e313d8e6439fe23a23c47705814 --- /dev/null +++ b/33 - Keyboard & Mouse Operations ActionChains Class/002 Perform Mouse Operations Left Click, Right Click, Double Click, Drag and Drop_en.srt @@ -0,0 +1,460 @@ +1 +00:00:00,000 --> 00:00:04,000 +Now, I'll move to the most operations again. + +2 +00:00:04,000 --> 00:00:09,000 +I'm just coming here and I'm going to create one more Python file with the name. + +3 +00:00:10,000 --> 00:00:13,000 +Most operations. + +4 +00:00:15,000 --> 00:00:17,000 +And again, few lines I'm going to copy from there. + +5 +00:00:17,000 --> 00:00:18,000 +So. + +6 +00:00:21,000 --> 00:00:26,000 +These are the few lines that I've copied, which is going to start, which is going to import package + +7 +00:00:26,000 --> 00:00:27,000 +and start browser. + +8 +00:00:28,000 --> 00:00:28,000 +OK. + +9 +00:00:28,000 --> 00:00:30,000 +Rich, are you want to start? + +10 +00:00:30,000 --> 00:00:32,000 +So I want to start this you out of this time? + +11 +00:00:32,000 --> 00:00:33,000 +And that's my application URL. + +12 +00:00:34,000 --> 00:00:35,000 +So if I show you here. + +13 +00:00:41,000 --> 00:00:42,000 +Yeah. + +14 +00:00:42,000 --> 00:00:43,000 +So what I want to do? + +15 +00:00:44,000 --> 00:00:45,000 +I'll show you how we can click. + +16 +00:00:46,000 --> 00:00:54,000 +Also, I'll show you how we can right click, double click and also mouth whole, so I perform different + +17 +00:00:54,000 --> 00:00:55,000 +mouse operations. + +18 +00:00:56,000 --> 00:01:02,000 +So first of all, because we want to use mouse operations again, we have to use the class action genes + +19 +00:01:02,000 --> 00:01:04,000 +which we have already imported. + +20 +00:01:04,000 --> 00:01:06,000 +So I'm just going to create object. + +21 +00:01:06,000 --> 00:01:13,000 +So I'm saying AZT action genes and passing the driver object with you. + +22 +00:01:13,000 --> 00:01:15,000 +First of all, I want to click. + +23 +00:01:16,000 --> 00:01:25,000 +So I'm saying it's dark and we have a direct operation like Click Dark Perform in this point of time. + +24 +00:01:26,000 --> 00:01:28,000 +I'm not saying where you need to click. + +25 +00:01:28,000 --> 00:01:32,000 +When I want to control this, just click on that and it will be left. + +26 +00:01:32,000 --> 00:01:33,000 +Click OK. + +27 +00:01:33,000 --> 00:01:34,000 +Let me show you. + +28 +00:01:39,000 --> 00:01:44,000 +We are not saying Glick, we're I'm saying wherever the control is, just click or just left click. + +29 +00:01:45,000 --> 00:01:47,000 +So that's a left click operation we are doing. + +30 +00:01:48,000 --> 00:01:50,000 +I show you how we can perform, right click. + +31 +00:01:51,000 --> 00:01:55,000 +So I'm going for context, like we call it context. + +32 +00:01:55,000 --> 00:01:56,000 +Click Dot Perform. + +33 +00:01:56,000 --> 00:01:59,000 +So wherever you control is just perform. + +34 +00:01:59,000 --> 00:02:00,000 +Right click over here. + +35 +00:02:01,000 --> 00:02:08,000 +Know then when we right click on any of that --, we got a menu, so let it perform, OK? + +36 +00:02:09,000 --> 00:02:11,000 +My brother started, You are talented. + +37 +00:02:13,000 --> 00:02:17,000 +And if we just check it here, that is right click perform. + +38 +00:02:19,000 --> 00:02:23,000 +So we perform left click and right click here. + +39 +00:02:23,000 --> 00:02:25,000 +We're not saying where to click. + +40 +00:02:26,000 --> 00:02:28,000 +We are just saying whenever the control, just click it. + +41 +00:02:29,000 --> 00:02:30,000 +We have the second option as well. + +42 +00:02:31,000 --> 00:02:37,000 +I want to click on this home about or I want to click on this log in so I can locate it. + +43 +00:02:39,000 --> 00:02:42,000 +And here it's a e with the text log in. + +44 +00:02:42,000 --> 00:02:49,000 +So I'm going to generate export drive word dot, find element by export. + +45 +00:02:51,000 --> 00:02:55,000 +And it's a weird text. + +46 +00:02:58,000 --> 00:02:59,000 +Is equal to this. + +47 +00:03:02,000 --> 00:03:06,000 +So we can click on this element. + +48 +00:03:07,000 --> 00:03:09,000 +So what I'm doing here, as of now, I'm just removing this line. + +49 +00:03:10,000 --> 00:03:12,000 +I'm saying we need to click, but we where to click. + +50 +00:03:13,000 --> 00:03:19,000 +So in bracket will look getting that element and then perform performance, perform that action, which + +51 +00:03:19,000 --> 00:03:21,000 +we got, which we said previously. + +52 +00:03:21,000 --> 00:03:22,000 +So it is going to perform. + +53 +00:03:22,000 --> 00:03:22,000 +Click. + +54 +00:03:23,000 --> 00:03:25,000 +I'm just running it again. + +55 +00:03:26,000 --> 00:03:31,000 +So this time we're taking out the most element and then clicking on that. + +56 +00:03:32,000 --> 00:03:35,000 +So if you check it out here, it will go to the login and then click. + +57 +00:03:36,000 --> 00:03:37,000 +So we got that log in. + +58 +00:03:37,000 --> 00:03:46,000 +So we have seen we can use click method in the two is first just click means with the controller's click + +59 +00:03:46,000 --> 00:03:49,000 +over there and click with Element Locator. + +60 +00:03:49,000 --> 00:03:54,000 +So here if you are performing Liquid Element, you do it with bigger control. + +61 +00:03:54,000 --> 00:03:59,000 +Pick your mouse to that particular element and then click on that in the same way. + +62 +00:03:59,000 --> 00:04:00,000 +So that was my click. + +63 +00:04:00,000 --> 00:04:07,000 +Operation can be used in the two ways so I can select click operation. + +64 +00:04:08,000 --> 00:04:09,000 +It was, is it not? + +65 +00:04:09,000 --> 00:04:10,000 +Click. + +66 +00:04:11,000 --> 00:04:19,000 +So it is going to click anywhere with wherever my control is, and other one is by locating that element + +67 +00:04:20,000 --> 00:04:21,000 +in the same way. + +68 +00:04:21,000 --> 00:04:26,000 +If you want to go for right click, if you want to perform, right click, you can do that same. + +69 +00:04:27,000 --> 00:04:28,000 +So I'm seeing context. + +70 +00:04:31,000 --> 00:04:35,000 +Click, which is also called Right Click. + +71 +00:04:35,000 --> 00:04:40,000 +So we can do it like, is it dark context? + +72 +00:04:40,000 --> 00:04:41,000 +Flick, Dot Perform. + +73 +00:04:45,000 --> 00:04:53,000 +Or a city dot context, click and we can look at whatever the element as I'm locating this. + +74 +00:04:56,000 --> 00:05:00,000 +Do outperform as of now, I'm just commenting this out. + +75 +00:05:02,000 --> 00:05:09,000 +So we have seen click and right click, we have the operation of the click as well so we can go for + +76 +00:05:09,000 --> 00:05:12,000 +like a CD dot double click. + +77 +00:05:12,000 --> 00:05:20,000 +And again we have the two option double click that perform or double click and we can give the locator + +78 +00:05:20,000 --> 00:05:21,000 +and then perform. + +79 +00:05:22,000 --> 00:05:23,000 +So that could also be used. + +80 +00:05:25,000 --> 00:05:32,000 +Now I'm coming to the one of the most important part which is moving my mouth to the menu so that menu + +81 +00:05:32,000 --> 00:05:32,000 +will be open. + +82 +00:05:33,000 --> 00:05:39,000 +So that's my web page, which is going to be open and I want to open this tutorial, so I want to take + +83 +00:05:39,000 --> 00:05:40,000 +my mouth over there. + +84 +00:05:40,000 --> 00:05:46,000 +First of all, I need to look at this element because I need to take my mouth over to it. + +85 +00:05:47,000 --> 00:05:48,000 +So I'm just getting it. + +86 +00:05:54,000 --> 00:05:58,000 +It's a spin with the next tutorial, so I'm going to use. + +87 +00:06:02,000 --> 00:06:13,000 +AZT, which is my object of the action gin glass dot move to element which element you want to move + +88 +00:06:13,000 --> 00:06:13,000 +to. + +89 +00:06:14,000 --> 00:06:29,000 +Driver Dot find element by X spot and it was a spin where text is equal to this and what I need to perform + +90 +00:06:30,000 --> 00:06:31,000 +here. + +91 +00:06:31,000 --> 00:06:41,000 +I'm seeing move to the element where they explore this, this and I'm moving this by using action gin. + +92 +00:06:41,000 --> 00:06:44,000 +Plus I'm just running it. + +93 +00:06:52,000 --> 00:06:59,000 +First, a take on the logging, and here we are, getting air like it is not able to locate that method. + +94 +00:06:59,000 --> 00:07:00,000 +OK, what I do. + +95 +00:07:01,000 --> 00:07:06,000 +First of all, I'm just commenting on this logging because click because right now I don't want to click + +96 +00:07:06,000 --> 00:07:09,000 +second, I'm going to use contains. + +97 +00:07:09,000 --> 00:07:16,000 +Hopefully you have gone through all element locator techniques. + +98 +00:07:17,000 --> 00:07:19,000 +So that is a second technique. + +99 +00:07:19,000 --> 00:07:20,000 +It might be possible there is a space. + +100 +00:07:21,000 --> 00:07:23,000 +So I'm just handling that part. + +101 +00:07:24,000 --> 00:07:28,000 +So contains no, I'm running it. + +102 +00:07:39,000 --> 00:07:46,000 +So if you notice that menu is open and I did not taken my mouth over there, if you check it on the + +103 +00:07:46,000 --> 00:07:48,000 +mouse's below. + +104 +00:07:48,000 --> 00:07:50,000 +But it is sticking to control. + +105 +00:07:50,000 --> 00:07:52,000 +It is not switching my mouse over there. + +106 +00:07:52,000 --> 00:07:55,000 +You will not see mouse movement does. + +107 +00:07:55,000 --> 00:07:57,000 +The control is going to that particular menu. + +108 +00:07:59,000 --> 00:08:06,000 +So here we have seen how we can perform keyboard and the mouse operations by using action genes, plus + +109 +00:08:07,000 --> 00:08:12,000 +also we can perform drag and drop, but as of now we are not having any scenario where we can perform, + +110 +00:08:12,000 --> 00:08:12,000 +drag and drop. + +111 +00:08:13,000 --> 00:08:19,000 +Later on, I'll show you how we can go for drag and drop by using Action Chin Plus. + +112 +00:08:20,000 --> 00:08:23,000 +So that's all we have of the session. + +113 +00:08:23,000 --> 00:08:29,000 +Here we covered how we can perform keyboard operations and mouse operations by using action genes. + +114 +00:08:31,000 --> 00:08:31,000 +That's all we have. + +115 +00:08:32,000 --> 00:08:33,000 +Thanks for watching this video. + diff --git a/34 - Fetch Data at Runtime from Application and Elements/001 Fetch Page Title Page URL Page HTML Source code_en.srt b/34 - Fetch Data at Runtime from Application and Elements/001 Fetch Page Title Page URL Page HTML Source code_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..31eaf7e0d88ec68146964adc1d4bc3a46d3eb2d6 --- /dev/null +++ b/34 - Fetch Data at Runtime from Application and Elements/001 Fetch Page Title Page URL Page HTML Source code_en.srt @@ -0,0 +1,276 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +So previously, we have seen how we can execute a simple test case in which we are performing some actions, + +3 +00:00:08,000 --> 00:00:14,000 +like we're putting data into the text box where we click on the radio button checkbox button. + +4 +00:00:14,000 --> 00:00:17,000 +So we are executing these tests given the different browsers. + +5 +00:00:19,000 --> 00:00:25,000 +Now I'll show you how we can fetch data from the page or as a browser at runtime. + +6 +00:00:26,000 --> 00:00:27,000 +OK. + +7 +00:00:27,000 --> 00:00:31,000 +I'm just going to the application that's going to the application. + +8 +00:00:31,000 --> 00:00:32,000 +That's my application. + +9 +00:00:33,000 --> 00:00:39,000 +If you check each application is having a title, if you check it over here, that's a title in the + +10 +00:00:39,000 --> 00:00:39,000 +same way. + +11 +00:00:41,000 --> 00:00:43,000 +On different pages, we have a user. + +12 +00:00:44,000 --> 00:00:47,000 +So you want to fetch page title or you want which page you are. + +13 +00:00:48,000 --> 00:00:52,000 +Or maybe you want to fetch page source. + +14 +00:00:52,000 --> 00:00:53,000 +That's the estimate of the page. + +15 +00:00:53,000 --> 00:00:59,000 +So, so in this section of show, you how we can fetch page title URL or page source. + +16 +00:01:00,000 --> 00:01:11,000 +For that, I'm just moving to my desk discuses and I'm going to copy this first test case and making + +17 +00:01:11,000 --> 00:01:15,000 +a copy of it like fetch data. + +18 +00:01:18,000 --> 00:01:21,000 +Fetch data, Datadog, be here. + +19 +00:01:22,000 --> 00:01:26,000 +I'm just removing all these lines as of now. + +20 +00:01:26,000 --> 00:01:33,000 +I just want to start browser, Chrome browser and maximized it. + +21 +00:01:34,000 --> 00:01:40,000 +Now I want to fetch page title whenever you want to fetch data. + +22 +00:01:40,000 --> 00:01:42,000 +We have a command driver got. + +23 +00:01:45,000 --> 00:01:49,000 +Later, it's going to fetch title of the page. + +24 +00:01:50,000 --> 00:01:55,000 +I'm just going to print it, so I'm just printing it. + +25 +00:01:56,000 --> 00:01:58,000 +So here, brother will be started. + +26 +00:01:58,000 --> 00:02:00,000 +It will maximize and it will be printed. + +27 +00:02:03,000 --> 00:02:05,000 +Just executing it. + +28 +00:02:06,000 --> 00:02:08,000 +It will fetch data and display on the console. + +29 +00:02:13,000 --> 00:02:22,000 +Well, this started maximized, and I'm just coming here, so if you take it here that they do this, + +30 +00:02:22,000 --> 00:02:26,000 +this, so we're able to fetch title successfully. + +31 +00:02:27,000 --> 00:02:35,000 +I'm just giving the comment like fetching title and I can write like title of the page is. + +32 +00:02:41,000 --> 00:02:44,000 +Which is this? + +33 +00:02:44,000 --> 00:02:46,000 +So we are able to fetch title successfully. + +34 +00:02:47,000 --> 00:02:54,000 +No, second, I'll show you how we can fetch you all of the page for that. + +35 +00:02:54,000 --> 00:02:56,000 +I'm going to use like fetch. + +36 +00:02:57,000 --> 00:03:05,000 +You are of Page four that we are going to use dry diver dot garant. + +37 +00:03:06,000 --> 00:03:07,000 +You are. + +38 +00:03:08,000 --> 00:03:09,000 +And I want to print it. + +39 +00:03:09,000 --> 00:03:14,000 +So print page you are held is. + +40 +00:03:17,000 --> 00:03:19,000 +And we are just doing concatenation. + +41 +00:03:20,000 --> 00:03:23,000 +We are just displaying it on the console. + +42 +00:03:24,000 --> 00:03:25,000 +Everything seems to be OK. + +43 +00:03:25,000 --> 00:03:27,000 +I just clear a screen. + +44 +00:03:28,000 --> 00:03:30,000 +I'm just going for execution. + +45 +00:03:31,000 --> 00:03:33,000 +So one to go for the execution. + +46 +00:03:33,000 --> 00:03:35,000 +This time it should pick title. + +47 +00:03:35,000 --> 00:03:40,000 +And you are all because we are we have written command for title in the URL. + +48 +00:03:48,000 --> 00:03:52,000 +But I was I started maximize and task is done. + +49 +00:03:52,000 --> 00:03:58,000 +I'm just closing this browser, if you check the title of the page, is this page you are releasing + +50 +00:03:59,000 --> 00:04:06,000 +this, so we are able to fetch data and you ought to know next. + +51 +00:04:06,000 --> 00:04:07,000 +And very important is. + +52 +00:04:08,000 --> 00:04:09,000 +That's a page. + +53 +00:04:10,000 --> 00:04:13,000 +I'm going to the page source means estimate of the page. + +54 +00:04:13,000 --> 00:04:19,000 +So any point of time, if you want to get complete page source, we can do it here. + +55 +00:04:20,000 --> 00:04:21,000 +I'm just coming here. + +56 +00:04:21,000 --> 00:04:30,000 +So this time I'm going to fetch complete page EdgeHTML. + +57 +00:04:31,000 --> 00:04:40,000 +For that, we have Driver Dot page source and I'm just displaying like print. + +58 +00:04:42,000 --> 00:04:49,000 +Driver Rod Paige source, and it's going to display complete HDMI, so before displaying that, I just + +59 +00:04:49,000 --> 00:04:55,000 +want to make this so that we can separate this data with the page source. + +60 +00:04:56,000 --> 00:04:59,000 +OK, now going for execution again? + +61 +00:05:08,000 --> 00:05:10,000 +Browsers started going to be maximized. + +62 +00:05:18,000 --> 00:05:25,000 +And once it is done, I'm just moving here, and if you check it in, the desert is a complete big, + +63 +00:05:25,000 --> 00:05:26,000 +solid display here. + +64 +00:05:26,000 --> 00:05:30,000 +So first of all, it shows title you are. + +65 +00:05:30,000 --> 00:05:33,000 +And from here, big stimulus started. + +66 +00:05:33,000 --> 00:05:38,000 +If you take it here now we are getting complete picture estimate the spread over here. + +67 +00:05:40,000 --> 00:05:46,000 +So we have seen how we can fetch page title y'all and compete at the landing. + +68 +00:05:48,000 --> 00:05:50,000 +That's all we have for the session. + +69 +00:05:52,000 --> 00:05:53,000 +Thanks for watching this video. + diff --git a/34 - Fetch Data at Runtime from Application and Elements/002 Fetch Element Text(Inner text) & Attribute Value_en.srt b/34 - Fetch Data at Runtime from Application and Elements/002 Fetch Element Text(Inner text) & Attribute Value_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..be9c30f970c9ddf7266a81bbf9a94c19741a3fd1 --- /dev/null +++ b/34 - Fetch Data at Runtime from Application and Elements/002 Fetch Element Text(Inner text) & Attribute Value_en.srt @@ -0,0 +1,244 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +So previously, we have seen how we can fetch data you are and page source now show you how we can fetch + +3 +00:00:10,000 --> 00:00:15,000 +text written on the element or we can fetch element attributes. + +4 +00:00:16,000 --> 00:00:23,000 +So first of all, I'm just moving to my application and I'll show you here. + +5 +00:00:23,000 --> 00:00:25,000 +We have a link with the details. + +6 +00:00:26,000 --> 00:00:27,000 +I just inspected. + +7 +00:00:30,000 --> 00:00:37,000 +So if you take it here in our text of this link is very detailed, so means at any time if you want + +8 +00:00:37,000 --> 00:00:41,000 +to check if you want to fetch inner text of any element. + +9 +00:00:42,000 --> 00:00:43,000 +I can do it here. + +10 +00:00:43,000 --> 00:00:45,000 +In-stadium Bay. + +11 +00:00:45,000 --> 00:00:46,000 +So I'm just moving here. + +12 +00:00:47,000 --> 00:00:52,000 +And first of all, I'm just removing these lines, which we have written in the previous session and + +13 +00:00:52,000 --> 00:00:56,000 +I'm saying fetching element text. + +14 +00:00:57,000 --> 00:01:00,000 +So first of all, I want to look at this. + +15 +00:01:00,000 --> 00:01:01,000 +I'm going to look at it by the last name. + +16 +00:01:02,000 --> 00:01:03,000 +So that's a class name. + +17 +00:01:04,000 --> 00:01:11,000 +So I'm writing like Driver Dot, find element bike last name. + +18 +00:01:12,000 --> 00:01:13,000 +And what do you want to do? + +19 +00:01:13,000 --> 00:01:15,000 +I want to pick a text of it. + +20 +00:01:17,000 --> 00:01:33,000 +I'm just printing it's a print text on a link is and just displaying this, everything seems to be OK + +21 +00:01:33,000 --> 00:01:36,000 +now I'm just going to execute. + +22 +00:01:38,000 --> 00:01:41,000 +So this time it should be text written on the element. + +23 +00:01:42,000 --> 00:01:44,000 +And we are going to dispute. + +24 +00:01:51,000 --> 00:01:52,000 +Browsers started. + +25 +00:01:55,000 --> 00:01:56,000 +Maximized. + +26 +00:01:59,000 --> 00:02:03,000 +And I'm just moving here, so it shows. + +27 +00:02:04,000 --> 00:02:15,000 +Text on the link is the big deal so we can fetch text or entire text of any element by using this text + +28 +00:02:15,000 --> 00:02:16,000 +property. + +29 +00:02:18,000 --> 00:02:21,000 +Now I want to show you, I'm just moving to the browser. + +30 +00:02:22,000 --> 00:02:29,000 +And for each element, we have multiple attributes like for this e, we have etched of color. + +31 +00:02:29,000 --> 00:02:30,000 +We have glass. + +32 +00:02:31,000 --> 00:02:32,000 +So these are the attributes. + +33 +00:02:32,000 --> 00:02:35,000 +If we talk about this button, sign up button, I'm just coming here. + +34 +00:02:36,000 --> 00:02:38,000 +Sign Up has two attributes. + +35 +00:02:38,000 --> 00:02:39,000 +One is type and value. + +36 +00:02:40,000 --> 00:02:44,000 +I want to fetch value of this button. + +37 +00:02:45,000 --> 00:02:55,000 +For that, I'm going to fetch fetching attribute value of element. + +38 +00:02:55,000 --> 00:03:04,000 +So first of all, we have to look at the two elements I'm writing like driver thought find element and + +39 +00:03:04,000 --> 00:03:08,000 +I'm going to generate a spot for this, for this by using the tape. + +40 +00:03:09,000 --> 00:03:10,000 +So I'm writing like. + +41 +00:03:13,000 --> 00:03:15,000 +That is my input. + +42 +00:03:16,000 --> 00:03:20,000 +So I'm writing input I. + +43 +00:03:23,000 --> 00:03:24,000 +Is equal to submit. + +44 +00:03:26,000 --> 00:03:31,000 +So first of all, we are locating that and then we want to fetch after locating, I want to fetch, + +45 +00:03:31,000 --> 00:03:33,000 +get attribute, which attribute you want to fetch. + +46 +00:03:34,000 --> 00:03:36,000 +I want to fetch value of it. + +47 +00:03:36,000 --> 00:03:44,000 +So I'm just writing like value and whatever the result is coming, I just want to displace or print. + +48 +00:03:47,000 --> 00:03:51,000 +Well, you off button is. + +49 +00:03:53,000 --> 00:04:02,000 +This so here we are, fetching value of value, of that particular element or indirectly, if I see + +50 +00:04:02,000 --> 00:04:05,000 +we are fetching a tribute of any element. + +51 +00:04:06,000 --> 00:04:10,000 +So that's an attribute and we can fetch any attribute. + +52 +00:04:10,000 --> 00:04:14,000 +So as of now, I'm picking value attribute. + +53 +00:04:15,000 --> 00:04:16,000 +Everything is good. + +54 +00:04:16,000 --> 00:04:18,000 +I'm just going to execute. + +55 +00:04:18,000 --> 00:04:19,000 +No. + +56 +00:04:28,000 --> 00:04:33,000 +So brother started maximised, I'm just moving here. + +57 +00:04:33,000 --> 00:04:37,000 +Text on the link is this and value of the button is sign up. + +58 +00:04:37,000 --> 00:04:41,000 +If you check it on application, the is sign up. + +59 +00:04:43,000 --> 00:04:52,000 +So we have seen how we can fetch, text or attribute in our text or attribute off any element. + +60 +00:04:54,000 --> 00:04:56,000 +So that's all we have for the session. + +61 +00:04:56,000 --> 00:04:57,000 +Thanks for watching this video. + diff --git a/34 - Fetch Data at Runtime from Application and Elements/003 Fetch Values from dropdown or list_en.srt b/34 - Fetch Data at Runtime from Application and Elements/003 Fetch Values from dropdown or list_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..3948f28459d640d9a0ddb1cee5cb8200958efa29 --- /dev/null +++ b/34 - Fetch Data at Runtime from Application and Elements/003 Fetch Values from dropdown or list_en.srt @@ -0,0 +1,256 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:08,000 +So previously, we have seen how we can work on drop down our list and we have seen there how we can + +3 +00:00:08,000 --> 00:00:10,000 +select value in the dropdown or list. + +4 +00:00:11,000 --> 00:00:17,000 +But now I'll show you how we can fetch data from the dashboard on our list for that. + +5 +00:00:17,000 --> 00:00:19,000 +First of all, I'm moving to my desk. + +6 +00:00:19,000 --> 00:00:19,000 +Yes. + +7 +00:00:20,000 --> 00:00:27,000 +And if you remember, I have created first test kits there we have using select. + +8 +00:00:27,000 --> 00:00:31,000 +So first of all, I'm just copying that. + +9 +00:00:32,000 --> 00:00:39,000 +And so, first of all, we need to import that select class now for selecting any data. + +10 +00:00:40,000 --> 00:00:42,000 +We have this option. + +11 +00:00:42,000 --> 00:00:46,000 +So I just copied this and pasted over here. + +12 +00:00:46,000 --> 00:00:50,000 +So now my test case, I'm just removing these fetching line. + +13 +00:00:52,000 --> 00:01:01,000 +So now my best guess is we are what we are working on a dropdown and we have selected some value. + +14 +00:01:03,000 --> 00:01:11,000 +Now, after the election, I want to fetch selected value and I want to fetch all options means I'll + +15 +00:01:11,000 --> 00:01:15,000 +show you two approaches one, whatever the value we just selected, you want to fetch it. + +16 +00:01:16,000 --> 00:01:19,000 +Second, you want to fetch all available values here. + +17 +00:01:20,000 --> 00:01:27,000 +So first of all, I'll show you how we can fetch selected data for DROPDOWN. + +18 +00:01:27,000 --> 00:01:30,000 +We have already created the object like object. + +19 +00:01:31,000 --> 00:01:37,000 +I want to fetch selected option. + +20 +00:01:38,000 --> 00:01:40,000 +So I'm writing like object dart. + +21 +00:01:42,000 --> 00:01:45,000 +We can either go for the all selected option or selected option. + +22 +00:01:47,000 --> 00:01:49,000 +All selected option will work when we are having a list. + +23 +00:01:50,000 --> 00:01:53,000 +We can have more than one option option selected then. + +24 +00:01:54,000 --> 00:01:58,000 +If you think only one option is selected, you can go for the full selected option. + +25 +00:01:59,000 --> 00:02:06,000 +So as of now, I'm just printing like a print and print to be the first selected option. + +26 +00:02:07,000 --> 00:02:09,000 +I'm just going to execute. + +27 +00:02:09,000 --> 00:02:11,000 +But we have to make some more changes. + +28 +00:02:11,000 --> 00:02:16,000 +So as of now, I'm just showing discord where we are fetching first selected option. + +29 +00:02:21,000 --> 00:02:27,000 +Now, the Star Trek task is done, I'm just coming here, if you check it, it is giving me the web + +30 +00:02:27,000 --> 00:02:29,000 +element means it is. + +31 +00:02:29,000 --> 00:02:38,000 +It is giving the object of first selected option, but I want to fetch text of it, so I just return + +32 +00:02:38,000 --> 00:02:39,000 +next. + +33 +00:02:40,000 --> 00:02:48,000 +Now, if I execute, you will notice it will give me text of selected option. + +34 +00:02:56,000 --> 00:02:56,000 +That is done. + +35 +00:02:58,000 --> 00:02:59,000 +And it shows me. + +36 +00:02:59,000 --> 00:03:03,000 +And if you want to check here merely selected. + +37 +00:03:04,000 --> 00:03:07,000 +So we have seen how we can fetch selected option. + +38 +00:03:08,000 --> 00:03:12,000 +Now I'll show you how we can fetch all available options if we check it here. + +39 +00:03:12,000 --> 00:03:17,000 +We have three options available choose gender, male and female, and I want to fetch all. + +40 +00:03:18,000 --> 00:03:23,000 +I'm just going for our widget dock options. + +41 +00:03:23,000 --> 00:03:31,000 +It's going to turn me all the options, but actually it is going to return object of all options available. + +42 +00:03:33,000 --> 00:03:38,000 +I want to go to the each and every web web element if you want to check. + +43 +00:03:38,000 --> 00:03:39,000 +We can just print it. + +44 +00:03:43,000 --> 00:03:50,000 +And later on, I'll show you how we can look through each and every option and print its text. + +45 +00:03:55,000 --> 00:03:55,000 +That is done. + +46 +00:03:56,000 --> 00:04:02,000 +And it shows many options here, like first option than second option, third option. + +47 +00:04:02,000 --> 00:04:14,000 +So what I can do, I'm just going to run a loop for for each option in this. + +48 +00:04:15,000 --> 00:04:20,000 +So it is going to return me a list of all the elements which are available. + +49 +00:04:20,000 --> 00:04:27,000 +I'm just running a loop through it and every and inside the loop for each option. + +50 +00:04:27,000 --> 00:04:29,000 +I'm printing text. + +51 +00:04:30,000 --> 00:04:31,000 +So it's a very straightforward play. + +52 +00:04:32,000 --> 00:04:33,000 +I'm just going to execute now. + +53 +00:04:34,000 --> 00:04:40,000 +So now it will bring all the options which are available in the dropdown and display its text. + +54 +00:04:45,000 --> 00:04:47,000 +Brows are going to be started. + +55 +00:04:50,000 --> 00:04:51,000 +Maximize. + +56 +00:04:54,000 --> 00:05:00,000 +And now if I show you there, so it shows these are the three options while ching milk, because we + +57 +00:05:00,000 --> 00:05:04,000 +have printed first selected option and then we are going for three options. + +58 +00:05:05,000 --> 00:05:09,000 +If you want, I can just for the clarification. + +59 +00:05:10,000 --> 00:05:14,000 +I can just make a line between them running one more time. + +60 +00:05:21,000 --> 00:05:26,000 +Brother started maximized and task is done, I'm just checking here. + +61 +00:05:26,000 --> 00:05:28,000 +So, yes, we are getting these three options. + +62 +00:05:30,000 --> 00:05:36,000 +So here we have seen how we can fetch selected option and how we can fetch all options in the dropdown. + +63 +00:05:37,000 --> 00:05:38,000 +That's all we have for the session. + +64 +00:05:39,000 --> 00:05:40,000 +Thanks for watching this video. + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/001 PyTest Introduction What is Pytest and How to use Pytest_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/001 PyTest Introduction What is Pytest and How to use Pytest_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..0ebd4086317af20d8651207aa98dee5aa70d9dad --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/001 PyTest Introduction What is Pytest and How to use Pytest_en.srt @@ -0,0 +1,256 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +So previously, we have seen how we can write selenium test cases using Python, and we have seen like + +3 +00:00:09,000 --> 00:00:13,000 +we are writing in a Python file and then executing that python file. + +4 +00:00:14,000 --> 00:00:22,000 +But in actual automation, we are going to use any unit testing framework for executing artist cases. + +5 +00:00:23,000 --> 00:00:26,000 +So one of the framework is by test. + +6 +00:00:27,000 --> 00:00:31,000 +So first of all, we need to understand what is best and why we are going to use Biotest. + +7 +00:00:32,000 --> 00:00:35,000 +Biotest is a unit testing framework for the Python. + +8 +00:00:36,000 --> 00:00:42,000 +We have many other framework as well, like unit test or nodes, but we are going to use byte test. + +9 +00:00:43,000 --> 00:00:50,000 +But the question here is if we can execute our tasks even without PI test, what is the need of the + +10 +00:00:50,000 --> 00:00:51,000 +test? + +11 +00:00:51,000 --> 00:00:53,000 +So first of all, what is by test? + +12 +00:00:53,000 --> 00:00:55,000 +It's a unit testing framework for the python. + +13 +00:00:56,000 --> 00:00:57,000 +Why do we need it? + +14 +00:00:57,000 --> 00:01:02,000 +So in protest or in your testing framework, we are going to get many advantages. + +15 +00:01:03,000 --> 00:01:06,000 +First, we can execute our test. + +16 +00:01:07,000 --> 00:01:13,000 +If you're writing multiple test in single python file and whenever we execute the Python file, it's + +17 +00:01:13,000 --> 00:01:15,000 +going to execute all the desks. + +18 +00:01:16,000 --> 00:01:19,000 +But by using byte test, we can control our execution. + +19 +00:01:20,000 --> 00:01:23,000 +We can set in which condition what. + +20 +00:01:23,000 --> 00:01:29,000 +All of this, because I want to execute, means we can conditionally execute our test cases. + +21 +00:01:30,000 --> 00:01:32,000 +So that is one advantage we are going to get with by test. + +22 +00:01:33,000 --> 00:01:37,000 +Next is can set the prerequisite and post script. + +23 +00:01:40,000 --> 00:01:44,000 +Post script, so here it a post script. + +24 +00:01:44,000 --> 00:01:47,000 +OK, what do you mean by the pre and post script? + +25 +00:01:48,000 --> 00:01:55,000 +My requirement is before executing a test case, I want to connect with the database or I want to start + +26 +00:01:55,000 --> 00:01:57,000 +browser and tell you all. + +27 +00:01:57,000 --> 00:02:03,000 +So whatever the task you want to perform before executing your test case, we call it prerequisites. + +28 +00:02:04,000 --> 00:02:11,000 +And whatever the task you want to perform after executing your task is the discard post script, so + +29 +00:02:11,000 --> 00:02:16,000 +we can set the prerequisite and postscript in unit testing framework. + +30 +00:02:16,000 --> 00:02:21,000 +So before execute a test case before execution, I want to make connection with the database. + +31 +00:02:21,000 --> 00:02:23,000 +That's a prerequisite. + +32 +00:02:23,000 --> 00:02:27,000 +And after execution, I want to break my connection from the database. + +33 +00:02:27,000 --> 00:02:29,000 +That is post-script. + +34 +00:02:29,000 --> 00:02:32,000 +So we can do that next. + +35 +00:02:32,000 --> 00:02:36,000 +And very important is assertions here. + +36 +00:02:36,000 --> 00:02:38,000 +First, we need to understand what is a solution. + +37 +00:02:39,000 --> 00:02:43,000 +So with the help of this solution, we can compare actual results with the expected result. + +38 +00:02:44,000 --> 00:02:49,000 +I take an example the men were testing whenever we are executing any manual desks. + +39 +00:02:50,000 --> 00:02:56,000 +So at the end or in the middle of the test case, we are comparing actual results with expected results. + +40 +00:02:56,000 --> 00:03:04,000 +And if that is past, so means test cases past as filled in the same way when we are going for automation. + +41 +00:03:04,000 --> 00:03:11,000 +We are also comparing actual results with expected results on many places, and that can be done by + +42 +00:03:11,000 --> 00:03:12,000 +using assertions. + +43 +00:03:13,000 --> 00:03:16,000 +So we are going to use assertions which are coming with biased. + +44 +00:03:18,000 --> 00:03:26,000 +Next and very important, once we complete our execution at the end, we want to generate a report that + +45 +00:03:26,000 --> 00:03:29,000 +report can be generated by using Biotest. + +46 +00:03:29,000 --> 00:03:34,000 +So these are the few advantages I have shown you many other advantages we are going to get with the + +47 +00:03:34,000 --> 00:03:37,000 +Biotest with unit testing framework. + +48 +00:03:37,000 --> 00:03:42,000 +And for this, of course, we are going to use a unit testing framework that is by test. + +49 +00:03:44,000 --> 00:03:51,000 +So now we have seen what is brightest now to how we can set a fight test for setting up by deceit. + +50 +00:03:51,000 --> 00:03:56,000 +First of all, we need to move for the command prompt and we know how we can use PIP. + +51 +00:03:56,000 --> 00:04:02,000 +So PIP install bite test enter. + +52 +00:04:03,000 --> 00:04:09,000 +It's going to start by test module, so let it execute first and then I'll show you. + +53 +00:04:11,000 --> 00:04:14,000 +So it shows you already had that by just OK, let me check. + +54 +00:04:15,000 --> 00:04:16,000 +Do I already have that? + +55 +00:04:16,000 --> 00:04:21,000 +So I'm moving to Python interpreter and here I'm writing help. + +56 +00:04:24,000 --> 00:04:29,000 +Modules show me the modules which are already installed, so here I'll show you. + +57 +00:04:29,000 --> 00:04:30,000 +Do I have bite or not? + +58 +00:04:31,000 --> 00:04:35,000 +If yes, it means it is already installed. + +59 +00:04:35,000 --> 00:04:40,000 +But when we are going to install, like Bip installed by default, it will install Biotest on your machine. + +60 +00:04:43,000 --> 00:04:47,000 +So here it shows the complete list, and if I check it here. + +61 +00:04:49,000 --> 00:04:50,000 +I already have here. + +62 +00:04:51,000 --> 00:04:58,000 +So if you educated that despite this, so it means we have ready to use brightest inner automation. + +63 +00:05:00,000 --> 00:05:02,000 +That's all we have for the session. + +64 +00:05:02,000 --> 00:05:08,000 +In next session, I'll show you how we can use brightest tanks watching this video. + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/002 Write Test Case in Pytest format and Execute using Pytest_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/002 Write Test Case in Pytest format and Execute using Pytest_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..6cfc8f934d328595178e798895b68c3230db3128 --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/002 Write Test Case in Pytest format and Execute using Pytest_en.srt @@ -0,0 +1,344 @@ +1 +00:00:00,000 --> 00:00:08,000 +Welcome to the testing world in this session, I'll show you what is naming conventions in finest. + +2 +00:00:09,000 --> 00:00:14,000 +First of all, I'll show you what all the standards we need to use in protest. + +3 +00:00:15,000 --> 00:00:21,000 +Then I'm going to write a small test case, and at the end, I'll execute this case using by this. + +4 +00:00:21,000 --> 00:00:28,000 +So I'm just moving to a new project, and here I have just created a project hidden by gem. + +5 +00:00:29,000 --> 00:00:36,000 +First of all, I'm just going to create a new Python fight now. + +6 +00:00:37,000 --> 00:00:44,000 +Whenever you want to create a test case file in protest, the test case file name should be started + +7 +00:00:44,000 --> 00:00:45,000 +with a test. + +8 +00:00:46,000 --> 00:00:48,000 +So that's a first naming convention. + +9 +00:00:49,000 --> 00:00:49,000 +All right. + +10 +00:00:49,000 --> 00:00:53,000 +So that's the first rule that Test gets, while name should start with test. + +11 +00:00:54,000 --> 00:00:58,000 +So I'm just giving the name like best underscore BCG digital one. + +12 +00:00:59,000 --> 00:01:02,000 +Well, we did registration. + +13 +00:01:02,000 --> 00:01:08,000 +You can give any name to your test case, but that file name must be started with that test. + +14 +00:01:10,000 --> 00:01:11,000 +Click on OK. + +15 +00:01:11,000 --> 00:01:15,000 +So one file is going to be created here and this. + +16 +00:01:16,000 --> 00:01:21,000 +Best underscored BCG is your one validated registration, no. + +17 +00:01:23,000 --> 00:01:26,000 +Whatever the court we want to write using by. + +18 +00:01:27,000 --> 00:01:29,000 +That should be in the form of methods. + +19 +00:01:29,000 --> 00:01:35,000 +So I'm going to create a method now I'm coming here and we know how to create methods in Python. + +20 +00:01:35,000 --> 00:01:36,000 +So def. + +21 +00:01:36,000 --> 00:01:43,000 +But if you're creating this method to write our test case, the method name should also be started by + +22 +00:01:43,000 --> 00:01:44,000 +the test. + +23 +00:01:44,000 --> 00:01:46,000 +So that is a second naming convention. + +24 +00:01:47,000 --> 00:01:50,000 +Best guess method name should also be start with the list. + +25 +00:01:51,000 --> 00:01:55,000 +So I'm writing like test registration. + +26 +00:01:57,000 --> 00:02:05,000 +Valid data, we are creating a method method name should be started with the test because you are going + +27 +00:02:05,000 --> 00:02:08,000 +to use this method for writing your test scores. + +28 +00:02:08,000 --> 00:02:10,000 +So there's a second naming convention. + +29 +00:02:11,000 --> 00:02:15,000 +No, if you want to write your test kiss as selenium test case. + +30 +00:02:16,000 --> 00:02:21,000 +So we know, first of all, we need to import some packages. + +31 +00:02:21,000 --> 00:02:35,000 +So I'm going here from selenium, dark web driver import chrome and here I'm going to create object + +32 +00:02:35,000 --> 00:02:36,000 +of the Chrome. + +33 +00:02:36,000 --> 00:02:43,000 +So I'm saying driver is equal to Chrome and we know we need to set executable path. + +34 +00:02:43,000 --> 00:02:47,000 +So I'm giving Lake Part is equal to and both of your files. + +35 +00:02:47,000 --> 00:02:49,000 +So in my case? + +36 +00:02:51,000 --> 00:02:56,000 +I'm just going to the Graham driver file, why we need to set that we have seen previously. + +37 +00:02:57,000 --> 00:02:59,000 +So I'm just giving that name. + +38 +00:03:02,000 --> 00:03:04,000 +That is Graham Driver, not easy. + +39 +00:03:09,000 --> 00:03:17,000 +And also, I have updated you whenever we are giving, but we need to use double backwards slash or + +40 +00:03:17,000 --> 00:03:23,000 +single forward slash, so I'm using double backwards slash and here while creating the object of chrome. + +41 +00:03:24,000 --> 00:03:28,000 +We need to give executable part is equal to part. + +42 +00:03:28,000 --> 00:03:36,000 +So here I have written a simple task as of now in which I'm just creating the object of chrome glass, + +43 +00:03:36,000 --> 00:03:38,000 +which is going to start browser. + +44 +00:03:39,000 --> 00:03:39,000 +No. + +45 +00:03:40,000 --> 00:03:41,000 +I want to enter. + +46 +00:03:41,000 --> 00:03:46,000 +You are telling that Driver Dot get and we know how to. + +47 +00:03:46,000 --> 00:03:56,000 +You are also Entity Pierce SDP w w w third distinct word dot com forward slash test. + +48 +00:03:57,000 --> 00:04:01,000 +So as of now, we have created one test method, which is going to start browser and enter. + +49 +00:04:01,000 --> 00:04:12,000 +You all know we heritage skills method as now we have seen my file name should be started with the test + +50 +00:04:12,000 --> 00:04:16,000 +and my best guess method names should be started the test. + +51 +00:04:17,000 --> 00:04:21,000 +I want to execute it now for execution. + +52 +00:04:21,000 --> 00:04:29,000 +Just right click and run by test for this test case means I'm going to execute this test case by using + +53 +00:04:29,000 --> 00:04:39,000 +Biotest as they select this, because this file is having a method which is going to be started by the + +54 +00:04:40,000 --> 00:04:41,000 +test. + +55 +00:04:41,000 --> 00:04:43,000 +That's why I start executing it. + +56 +00:04:44,000 --> 00:04:47,000 +So if you check it here, my browser is going to be started. + +57 +00:04:47,000 --> 00:04:51,000 +I'll just execute again and it will enter the user name. + +58 +00:04:52,000 --> 00:04:54,000 +It will enter the URL if you check it. + +59 +00:04:54,000 --> 00:04:55,000 +There you are. + +60 +00:04:55,000 --> 00:04:56,000 +All was entered. + +61 +00:04:58,000 --> 00:05:02,000 +No, I want to perform some more task. + +62 +00:05:02,000 --> 00:05:03,000 +As of now. + +63 +00:05:03,000 --> 00:05:09,000 +It's just started browser and just entered Ukraine. + +64 +00:05:09,000 --> 00:05:14,000 +So we have seen here two options like test gifs. + +65 +00:05:14,000 --> 00:05:17,000 +Why should we started the test and Pesca's method name should be started to the test. + +66 +00:05:18,000 --> 00:05:21,000 +OK, what I do, I just change the name of this method. + +67 +00:05:22,000 --> 00:05:23,000 +I'm just giving the name a test. + +68 +00:05:24,000 --> 00:05:29,000 +Now I try to execute by the by test and let's see what's going to happen. + +69 +00:05:30,000 --> 00:05:38,000 +It shows zero execution because my piped in by test best method name should be started with the test + +70 +00:05:39,000 --> 00:05:41,000 +in the same way. + +71 +00:05:41,000 --> 00:05:45,000 +I'm just removing it and changing the name. + +72 +00:05:45,000 --> 00:05:53,000 +So if I change the name or if I remove dust here from the name of the file. + +73 +00:05:55,000 --> 00:05:56,000 +And click on the Reflektor. + +74 +00:05:57,000 --> 00:06:01,000 +Still, we can execute it by using bye by test. + +75 +00:06:01,000 --> 00:06:06,000 +So if you notice I'm just executing this, so here it is executing. + +76 +00:06:07,000 --> 00:06:10,000 +So I would see that browsers started. + +77 +00:06:11,000 --> 00:06:18,000 +I would say name of the method must be started with the test, but name of the file is not mandatory. + +78 +00:06:18,000 --> 00:06:21,000 +But but it's always a good practice to use test. + +79 +00:06:22,000 --> 00:06:23,000 +By that, you can understand, OK. + +80 +00:06:23,000 --> 00:06:24,000 +That's my best guess. + +81 +00:06:25,000 --> 00:06:26,000 +But if you want to skip, you can. + +82 +00:06:28,000 --> 00:06:33,000 +So here in the session, we have seen how we can create a test case file, how we can grotesqueness + +83 +00:06:33,000 --> 00:06:39,000 +method change by animal testing, what's the impact of that and how we can execute this? + +84 +00:06:39,000 --> 00:06:40,000 +Guess using Biotest test? + +85 +00:06:41,000 --> 00:06:43,000 +That's all we have for the session. + +86 +00:06:44,000 --> 00:06:45,000 +Thanks for watching this video. + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/003 Skip Test Cases Execute test cases conditionally_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/003 Skip Test Cases Execute test cases conditionally_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..64e7c8197f1402f5250b45f0c8faf032207e2bd4 --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/003 Skip Test Cases Execute test cases conditionally_en.srt @@ -0,0 +1,596 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:09,000 +So previously, we have seen how we can write test kits in the form of bite test and how we can execute + +3 +00:00:09,000 --> 00:00:09,000 +it. + +4 +00:00:10,000 --> 00:00:16,000 +But previously I have shown you, but previously I've shown you whenever you want to go for execution, + +5 +00:00:16,000 --> 00:00:18,000 +just right click and run. + +6 +00:00:18,000 --> 00:00:24,000 +We can also execute it from the command prompt so either we can right click here. + +7 +00:00:24,000 --> 00:00:29,000 +Open terminal and going to executed by the command prompt. + +8 +00:00:29,000 --> 00:00:35,000 +For that, we can write byte test, but it will not show any execution. + +9 +00:00:35,000 --> 00:00:35,000 +Why? + +10 +00:00:36,000 --> 00:00:43,000 +Because it is not finding any file which is starting with the test, so it should not test to execute. + +11 +00:00:45,000 --> 00:00:48,000 +If you want to execute or bite us by, just right click. + +12 +00:00:49,000 --> 00:00:55,000 +It's not mandated to use test in the name of the file, but if you want to execute from the command + +13 +00:00:55,000 --> 00:00:57,000 +prompt, it's mandatory. + +14 +00:00:57,000 --> 00:01:01,000 +So I just go there and do refactor. + +15 +00:01:03,000 --> 00:01:05,000 +So just right click on this. + +16 +00:01:06,000 --> 00:01:07,000 +We have the option of. + +17 +00:01:09,000 --> 00:01:13,000 +Refactor rename and I'm starting with the name. + +18 +00:01:13,000 --> 00:01:23,000 +Best underscore, the factor that is done now do the same task and you will notice it will start finding + +19 +00:01:23,000 --> 00:01:28,000 +your deck file with just starting with the test and restart execution of Pesci's. + +20 +00:01:28,000 --> 00:01:35,000 +So now we got to know when we need to give the file name by test and when we can skip in the same. + +21 +00:01:35,000 --> 00:01:41,000 +If we want to execute from the from the command prompt, we can just give the copy the part of this + +22 +00:01:42,000 --> 00:01:48,000 +file moving to the command prompt on command from CD. + +23 +00:01:50,000 --> 00:01:54,000 +And I just need to move to the location where the file is based. + +24 +00:01:54,000 --> 00:01:57,000 +So I'm just copying the path of this folder. + +25 +00:01:58,000 --> 00:01:59,000 +See Project. + +26 +00:02:00,000 --> 00:02:05,000 +And here I can also write by Biotest, so it's going to execute my best guess. + +27 +00:02:06,000 --> 00:02:07,000 +So one item is there. + +28 +00:02:07,000 --> 00:02:11,000 +If you check it here, it shows one item as it was just executing. + +29 +00:02:12,000 --> 00:02:17,000 +So now we have seen how we can execute our tasks from the different places. + +30 +00:02:19,000 --> 00:02:23,000 +Next, I'm moving to can we write multiple tasks in a single file? + +31 +00:02:23,000 --> 00:02:24,000 +Answer is yes. + +32 +00:02:25,000 --> 00:02:33,000 +So what I'm going to do, first of all, I'm just maximizing maximizing driver dart maximize window. + +33 +00:02:34,000 --> 00:02:35,000 +Can we have multiple tasks in a file? + +34 +00:02:36,000 --> 00:02:36,000 +Answer is yes. + +35 +00:02:37,000 --> 00:02:43,000 +I just copied this and pasted it with here, but I'm just giving the different name to this method. + +36 +00:02:44,000 --> 00:02:47,000 +So best registration validator in validator? + +37 +00:02:48,000 --> 00:02:55,000 +As of now, we have the same steps in that I just want to show you we can have multiple discuses again. + +38 +00:02:56,000 --> 00:03:01,000 +If you have multiple tasks and you want to go for the execution, either, you can do it from here, + +39 +00:03:01,000 --> 00:03:05,000 +like byte test enter as we enter. + +40 +00:03:06,000 --> 00:03:10,000 +Now it will find out finding two items if you check it here. + +41 +00:03:10,000 --> 00:03:13,000 +Two items first, guess is executing. + +42 +00:03:14,000 --> 00:03:16,000 +So first, browsers started going to be maximized. + +43 +00:03:17,000 --> 00:03:17,000 +Yes. + +44 +00:03:18,000 --> 00:03:20,000 +Now it's executing the second tasks. + +45 +00:03:20,000 --> 00:03:24,000 +So second, Bauza started going to maximize. + +46 +00:03:25,000 --> 00:03:28,000 +So we can have multiple test in the file. + +47 +00:03:28,000 --> 00:03:29,000 +Yes, we have seen this. + +48 +00:03:30,000 --> 00:03:34,000 +And if you want to execute, you can execute from this command prompt as well. + +49 +00:03:34,000 --> 00:03:40,000 +We can go for execution from its own terminal, from or from the command prompt. + +50 +00:03:42,000 --> 00:03:43,000 +So we have seen can we have multiple? + +51 +00:03:43,000 --> 00:03:44,000 +Yes, yes. + +52 +00:03:44,000 --> 00:03:49,000 +No, I'll show you how we can skip execution of any specific test case. + +53 +00:03:49,000 --> 00:03:51,000 +So now I'm just kidding here. + +54 +00:03:52,000 --> 00:03:55,000 +And to execute any specific test case. + +55 +00:03:55,000 --> 00:03:58,000 +First of all, going to the test case, which you want to skip. + +56 +00:03:59,000 --> 00:04:05,000 +But before that, we have to import by test module something import. + +57 +00:04:06,000 --> 00:04:08,000 +By best. + +58 +00:04:09,000 --> 00:04:16,000 +No, that whichever the best guess you want to skip, added Decorator or their decorator, start with + +59 +00:04:16,000 --> 00:04:20,000 +the Adelaide Bite Dot. + +60 +00:04:23,000 --> 00:04:26,000 +Mosque dot skip. + +61 +00:04:26,000 --> 00:04:28,000 +And why do you want to skip it? + +62 +00:04:28,000 --> 00:04:36,000 +Don't want to execute on current build? + +63 +00:04:36,000 --> 00:04:38,000 +You can give any message over here. + +64 +00:04:39,000 --> 00:04:42,000 +So now I have added a bite test. + +65 +00:04:42,000 --> 00:04:45,000 +I have skipped one test case over here. + +66 +00:04:46,000 --> 00:04:51,000 +So when we are going for the execution in this file, we have to test cases and I'm and I'm skipping + +67 +00:04:51,000 --> 00:04:52,000 +one. + +68 +00:04:52,000 --> 00:04:54,000 +So only one test case will execute. + +69 +00:04:54,000 --> 00:04:57,000 +And it's not mosque at St. Mark. + +70 +00:04:57,000 --> 00:04:58,000 +So I just updated that. + +71 +00:04:59,000 --> 00:05:01,000 +And now going for execution. + +72 +00:05:01,000 --> 00:05:05,000 +So I'm just coming here and biased. + +73 +00:05:05,000 --> 00:05:10,000 +So it's going to execute one test case out of the two. + +74 +00:05:12,000 --> 00:05:13,000 +Let it execute. + +75 +00:05:13,000 --> 00:05:13,000 +Then I'll show you. + +76 +00:05:18,000 --> 00:05:21,000 +One test case is done and one is a script. + +77 +00:05:22,000 --> 00:05:24,000 +You can check it one pass and one skip. + +78 +00:05:25,000 --> 00:05:29,000 +As of now, it's not giving information like Rich Desk is cases boss Richard Skip. + +79 +00:05:30,000 --> 00:05:33,000 +We can do it like I want to go for bite test. + +80 +00:05:33,000 --> 00:05:36,000 +Hyphen V. means both. + +81 +00:05:36,000 --> 00:05:39,000 +It's it's a mode in which we are going to get more information. + +82 +00:05:40,000 --> 00:05:51,000 +So now it will show you which to guess is a script and we're just past just executing browser started + +83 +00:05:51,000 --> 00:05:52,000 +maximized. + +84 +00:05:52,000 --> 00:05:58,000 +And if we check it here, the particular test case is skipped and this one is. + +85 +00:05:58,000 --> 00:06:00,000 +And next is bust. + +86 +00:06:02,000 --> 00:06:05,000 +So here we have seen how we can write multiple test guesses. + +87 +00:06:06,000 --> 00:06:11,000 +And also, we have seen how we can skip execution of any specific tasks. + +88 +00:06:11,000 --> 00:06:15,000 +Is now moving to conditionally skip execution. + +89 +00:06:15,000 --> 00:06:16,000 +What does it mean? + +90 +00:06:17,000 --> 00:06:17,000 +OK. + +91 +00:06:18,000 --> 00:06:21,000 +For that, I'm just coming here on a project. + +92 +00:06:23,000 --> 00:06:27,000 +I want to skip this test case, but only in this specific case. + +93 +00:06:27,000 --> 00:06:28,000 +So I'm just ticking. + +94 +00:06:28,000 --> 00:06:32,000 +I'm just taking example like I have a variable here having the values. + +95 +00:06:34,000 --> 00:06:37,000 +For that, I'm going to use skip if. + +96 +00:06:38,000 --> 00:06:47,000 +And I'm giving the first I'm giving the condition E is greater than 100, then skip this. + +97 +00:06:48,000 --> 00:06:54,000 +And when you are going for Skip, we need to mention the second argument is reason. + +98 +00:06:55,000 --> 00:06:56,000 +So reason is equal. + +99 +00:06:56,000 --> 00:07:01,000 +That's how well you know everything is OK going for execution. + +100 +00:07:01,000 --> 00:07:03,000 +So we know how we can go for the execution. + +101 +00:07:03,000 --> 00:07:04,000 +I'm just splitting screen. + +102 +00:07:06,000 --> 00:07:09,000 +And by Test Hyphen V. + +103 +00:07:11,000 --> 00:07:13,000 +This time it should execute both. + +104 +00:07:14,000 --> 00:07:16,000 +Is because condition is not matching. + +105 +00:07:17,000 --> 00:07:21,000 +So one test gets executed and going for second test case. + +106 +00:07:26,000 --> 00:07:31,000 +Second, Test gets executed now because all the risk is executing because this condition is not match. + +107 +00:07:32,000 --> 00:07:39,000 +But if I make changes here, like candy is equal to 101, then this condition is going to match is going + +108 +00:07:39,000 --> 00:07:40,000 +to be true. + +109 +00:07:40,000 --> 00:07:48,000 +So this particular test case will be skipped clearing screen running yet again. + +110 +00:07:48,000 --> 00:07:51,000 +So this time it should execute only one test case. + +111 +00:08:01,000 --> 00:08:05,000 +So that is only one best case executed and one escaped. + +112 +00:08:07,000 --> 00:08:15,000 +So we have seen how we can skip a particular test case or how we can skip this case by giving some conditions + +113 +00:08:17,000 --> 00:08:19,000 +for that, we are going to use Skip. + +114 +00:08:21,000 --> 00:08:21,000 +If. + +115 +00:08:23,000 --> 00:08:29,000 +Now I'm coming to how we can execute any specific tasks. + +116 +00:08:30,000 --> 00:08:37,000 +I'm just coming here and we have Buddhist guesses here. + +117 +00:08:37,000 --> 00:08:39,000 +I'm just removing. + +118 +00:08:40,000 --> 00:08:43,000 +Skip from here. + +119 +00:08:44,000 --> 00:08:45,000 +So no, skip is no. + +120 +00:08:45,000 --> 00:08:56,000 +Now we have to discuss what execution I'm going to the terminal and what execution if you want to execute + +121 +00:08:56,000 --> 00:08:58,000 +any specific death case. + +122 +00:08:58,000 --> 00:08:59,000 +I'm going for. + +123 +00:09:03,000 --> 00:09:08,000 +By Biotest Hyphen M Hyphen, Ky. + +124 +00:09:09,000 --> 00:09:12,000 +And we can give specific test names. + +125 +00:09:12,000 --> 00:09:14,000 +I just want to execute this one. + +126 +00:09:15,000 --> 00:09:24,000 +Executing it will execute only specific test case if rejected two items, but one be selected because + +127 +00:09:24,000 --> 00:09:26,000 +I'm executing only one this time. + +128 +00:09:27,000 --> 00:09:28,000 +It will execute. + +129 +00:09:28,000 --> 00:09:30,000 +Only one task is passed or failed. + +130 +00:09:33,000 --> 00:09:39,000 +In the same way, I want to execute all the tasks in which we are getting registration. + +131 +00:09:39,000 --> 00:09:42,000 +OK, what I do here, I create one more desk is. + +132 +00:09:49,000 --> 00:09:52,000 +And here, best invalid data. + +133 +00:09:53,000 --> 00:09:57,000 +So now we have to test guess in which we are getting the word registration. + +134 +00:09:57,000 --> 00:09:58,000 +In third, we are not getting it. + +135 +00:09:59,000 --> 00:10:06,000 +I want to execute all test cases where we are getting word registration for that. + +136 +00:10:06,000 --> 00:10:13,000 +Again, I'm just moving to command prompt and by test hyphen key. + +137 +00:10:14,000 --> 00:10:18,000 +And other than giving the full name, I can give you the specific word. + +138 +00:10:19,000 --> 00:10:24,000 +So I'm just giving the word like this execute. + +139 +00:10:25,000 --> 00:10:30,000 +It's going to execute all the best guesses where we are getting word registration. + +140 +00:10:30,000 --> 00:10:35,000 +So if you check it, tip three items one be selected means two are selected. + +141 +00:10:36,000 --> 00:10:38,000 +First executed, not going for second. + +142 +00:10:47,000 --> 00:10:51,000 +So now we executed only two decades. + +143 +00:10:53,000 --> 00:11:01,000 +So here here we have seen how we can go for conditional skip, how we can execute any specific or group + +144 +00:11:01,000 --> 00:11:01,000 +of death. + +145 +00:11:02,000 --> 00:11:06,000 +Also, we have seen we can use verbose how often we do display detailed result. + +146 +00:11:09,000 --> 00:11:14,000 +So here in the session, we have covered how we can write this case, how we can execute and how we + +147 +00:11:14,000 --> 00:11:14,000 +can skip them. + +148 +00:11:16,000 --> 00:11:17,000 +That's all we have for the session. + +149 +00:11:18,000 --> 00:11:19,000 +Thanks for watching this video. + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/004 Grouping Test Cases and Execute any specific group_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/004 Grouping Test Cases and Execute any specific group_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..fd3d03abd37ae621baa3d8eb542eef7faf2f8d4a --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/004 Grouping Test Cases and Execute any specific group_en.srt @@ -0,0 +1,272 @@ +1 +00:00:01,000 --> 00:00:07,000 +Welcome to the testing world in this session, I'll show you how we can group similar discourses. + +2 +00:00:08,000 --> 00:00:09,000 +OK, what do you mean by the grouping? + +3 +00:00:10,000 --> 00:00:17,000 +It might be possible we have hundreds of discuses and I want to execute. + +4 +00:00:17,000 --> 00:00:20,000 +Only specific task is because when we're going for the men were testing. + +5 +00:00:21,000 --> 00:00:23,000 +It's not that we are executing all the test kits. + +6 +00:00:23,000 --> 00:00:24,000 +Always. + +7 +00:00:24,000 --> 00:00:27,000 +Sometimes we have to go for the sanity testing. + +8 +00:00:27,000 --> 00:00:29,000 +Sometimes we have to go for the smoke testing. + +9 +00:00:29,000 --> 00:00:33,000 +Sometimes we have to execute only priority one test case. + +10 +00:00:33,000 --> 00:00:36,000 +Sometimes we need to execute only functional tasks. + +11 +00:00:36,000 --> 00:00:41,000 +So here also we have the option to grouping test kits. + +12 +00:00:41,000 --> 00:00:41,000 +So what? + +13 +00:00:41,000 --> 00:00:45,000 +All the automation test kits we are going to write, we can group them together. + +14 +00:00:46,000 --> 00:00:51,000 +And whenever we want to execute, we can give the name of the group, which we want to execute. + +15 +00:00:52,000 --> 00:00:56,000 +So I'm just moving to my project and here we have three desks. + +16 +00:00:56,000 --> 00:01:05,000 +OK, I'm grouping them like, so I'm going to the test kit and bite test mark. + +17 +00:01:06,000 --> 00:01:08,000 +And there this is. + +18 +00:01:08,000 --> 00:01:10,000 +We can give group name here. + +19 +00:01:10,000 --> 00:01:12,000 +So I'm giving like smoke. + +20 +00:01:13,000 --> 00:01:19,000 +So I have a group with the name smoke in the same way I'm coming to the second test case. + +21 +00:01:20,000 --> 00:01:30,000 +I'm saying by Test Dark Mark Dot Sanity, and I'm going to the third test case by test. + +22 +00:01:34,000 --> 00:01:35,000 +Mark? + +23 +00:01:39,000 --> 00:01:40,000 +And again, I'm writing smoke. + +24 +00:01:41,000 --> 00:01:50,000 +So now we have protest kisses, which belongs to the smoke testing and one for sanity, for execution. + +25 +00:01:50,000 --> 00:01:59,000 +I'm just moving to terminal and read right here like fight test hyphen m. + +26 +00:01:59,000 --> 00:02:00,000 +I want a minute. + +27 +00:02:00,000 --> 00:02:02,000 +Now I'm going to give a bag. + +28 +00:02:02,000 --> 00:02:07,000 +So my tag is smoke and these bags are a user defined. + +29 +00:02:07,000 --> 00:02:08,000 +You can give any name. + +30 +00:02:08,000 --> 00:02:12,000 +So I have just given my name, smoke and sanity. + +31 +00:02:12,000 --> 00:02:13,000 +So same name. + +32 +00:02:13,000 --> 00:02:15,000 +We need to parcel it hit by this hyphen smoke. + +33 +00:02:16,000 --> 00:02:23,000 +And I'm just passing hyphen, which means in verbose mode, I'm just executing it. + +34 +00:02:23,000 --> 00:02:29,000 +Just total three and only one be selected means two or selected way because we have blue smoke discuses. + +35 +00:02:30,000 --> 00:02:34,000 +OK, let it execute and I'll show you first. + +36 +00:02:34,000 --> 00:02:35,000 +This is executing. + +37 +00:02:37,000 --> 00:02:40,000 +Then it's going to the second test case after execution. + +38 +00:02:40,000 --> 00:02:43,000 +I'll show you results like which all this guys are executed. + +39 +00:02:50,000 --> 00:02:56,000 +Second executed, moving to result hit it shows which all the rest get executed. + +40 +00:02:59,000 --> 00:03:07,000 +Best validator, if you take it here, the streets are validated there to smoke and test invalid data, + +41 +00:03:07,000 --> 00:03:08,000 +which is smoke. + +42 +00:03:08,000 --> 00:03:10,000 +So second is test invalid. + +43 +00:03:12,000 --> 00:03:18,000 +So we have seen like out of the three it executed to one is deflected in the same way. + +44 +00:03:19,000 --> 00:03:23,000 +I'm just passing Senate Tech here and executing. + +45 +00:03:24,000 --> 00:03:30,000 +So to be selected out of three, so only one test case will execute. + +46 +00:03:30,000 --> 00:03:31,000 +Let it execute. + +47 +00:03:31,000 --> 00:03:32,000 +Daniel Schorr, you. + +48 +00:03:43,000 --> 00:03:43,000 +That is done. + +49 +00:03:44,000 --> 00:03:51,000 +If you check here, which is executing death registration, invalid data because for sanity, we have + +50 +00:03:51,000 --> 00:03:53,000 +death registration, invalid data. + +51 +00:03:54,000 --> 00:03:59,000 +So now we have seen how we can control execution by any specific tag. + +52 +00:04:00,000 --> 00:04:07,000 +I want to show you the reverse of that reverse of it, like I want to execute all the test case except + +53 +00:04:07,000 --> 00:04:08,000 +sanity. + +54 +00:04:08,000 --> 00:04:14,000 +For that, we need to mention by test hyphen M in double courts. + +55 +00:04:14,000 --> 00:04:15,000 +First of all, not. + +56 +00:04:16,000 --> 00:04:17,000 +And then peg. + +57 +00:04:17,000 --> 00:04:18,000 +So not is the key word. + +58 +00:04:18,000 --> 00:04:21,000 +And Peg is sanity hyphen v for purpose. + +59 +00:04:22,000 --> 00:04:23,000 +I'm just executing. + +60 +00:04:24,000 --> 00:04:28,000 +So you will notice it will execute all test cases other than sanity. + +61 +00:04:28,000 --> 00:04:32,000 +So we have two test cases which which are other than sanity. + +62 +00:04:32,000 --> 00:04:33,000 +You can check it here. + +63 +00:04:33,000 --> 00:04:36,000 +Total three we are having one is this selected? + +64 +00:04:36,000 --> 00:04:38,000 +Means sanity discuses D. Selected. + +65 +00:04:40,000 --> 00:04:43,000 +So one is executed not going for the second one. + +66 +00:04:43,000 --> 00:04:50,000 +So we have seen how we can control our execution by big, by giving the take on the best cases. + +67 +00:04:53,000 --> 00:05:01,000 +1:02, be selected, so that's all we have for the session here, we have seen how we can control our + +68 +00:05:01,000 --> 00:05:05,000 +execution by giving watching the sweet deal. + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/005 Fixtures What is Fixture and How to implement it_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/005 Fixtures What is Fixture and How to implement it_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..d2588401964a33e6e42c33d111cfe466cd35b5c7 --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/005 Fixtures What is Fixture and How to implement it_en.srt @@ -0,0 +1,440 @@ +1 +00:00:00,000 --> 00:00:05,000 +Welcome to the testing world in this session, we are going to go up by test fixture. + +2 +00:00:06,000 --> 00:00:10,000 +So first of all, we need to understand what is fixture where we are going to use it. + +3 +00:00:11,000 --> 00:00:18,000 +So while doing automation, in many cases it is required to execute some code before your desk is. + +4 +00:00:19,000 --> 00:00:22,000 +Example could be like, I want to start browser. + +5 +00:00:22,000 --> 00:00:23,000 +I want to maximize it. + +6 +00:00:24,000 --> 00:00:26,000 +Or maybe you want to connect with the database. + +7 +00:00:27,000 --> 00:00:32,000 +So whatever the task you want to perform before your desk is, that's not a part of your tasks that + +8 +00:00:32,000 --> 00:00:34,000 +will be executed before your desk. + +9 +00:00:35,000 --> 00:00:41,000 +Or maybe in some cases, you are required to execute something after your desk is like after the desk + +10 +00:00:42,000 --> 00:00:42,000 +is. + +11 +00:00:42,000 --> 00:00:43,000 +I want to close my browser. + +12 +00:00:43,000 --> 00:00:45,000 +I want to disconnect from the database. + +13 +00:00:45,000 --> 00:00:51,000 +So whatever the code that you think that need to be executed before the desks or after the desk is, + +14 +00:00:52,000 --> 00:00:54,000 +I can put it into the fixtures. + +15 +00:00:54,000 --> 00:00:59,000 +Fixtures are used to execute something before your desk and after your desk is. + +16 +00:01:00,000 --> 00:01:05,000 +So here, first of all, I'll show you how we can make fiction and different operations, which we can + +17 +00:01:05,000 --> 00:01:07,000 +use with fixtures. + +18 +00:01:08,000 --> 00:01:09,000 +I'm just moving through the project. + +19 +00:01:10,000 --> 00:01:12,000 +And as of now, I'm removing these decks. + +20 +00:01:12,000 --> 00:01:16,000 +Previously, we have seen how we can put tags on your desk PCs. + +21 +00:01:17,000 --> 00:01:18,000 +So just remove that. + +22 +00:01:19,000 --> 00:01:19,000 +No. + +23 +00:01:20,000 --> 00:01:27,000 +If you notice in all these three desk PCs, we have a line which is setting Chrome Driver Exit Path. + +24 +00:01:29,000 --> 00:01:32,000 +And I know that need to be done before each of the desks. + +25 +00:01:32,000 --> 00:01:37,000 +So that kind of cases, I can go to create fixtures how we can make it. + +26 +00:01:38,000 --> 00:01:44,000 +So I'm just coming here, Beth, and I'm seeing set. + +27 +00:01:45,000 --> 00:01:51,000 +But you can give any name and here I'm going to write that particular line. + +28 +00:01:52,000 --> 00:01:58,000 +So that is the line which I want to execute before each of the tasks. + +29 +00:01:58,000 --> 00:02:05,000 +So I'm just removing this line from best case and placed into a method, a separate method. + +30 +00:02:08,000 --> 00:02:19,000 +No, we need to add a fixture over here, so I'm riding Lake at the rate by test, so for that, we + +31 +00:02:19,000 --> 00:02:26,000 +need to import by test first, by test dot fixture, something fixed. + +32 +00:02:26,000 --> 00:02:30,000 +You know, that line is set. + +33 +00:02:30,000 --> 00:02:31,000 +OK. + +34 +00:02:32,000 --> 00:02:39,000 +Also, if you notice driver object is creating the occurring object of the driver that also need to + +35 +00:02:39,000 --> 00:02:41,000 +be done before each of the test gives. + +36 +00:02:41,000 --> 00:02:43,000 +So I'm adding these two lines. + +37 +00:02:45,000 --> 00:02:49,000 +Into the fixture, everything is OK as of now. + +38 +00:02:49,000 --> 00:02:55,000 +But here the problem is driver object, which we are creating in the fixture will be used in the different + +39 +00:02:55,000 --> 00:02:59,000 +test cases, and that seems to be local as of now. + +40 +00:02:59,000 --> 00:03:06,000 +Why it's local because this driver object is created inside the set up method, so it will be local + +41 +00:03:06,000 --> 00:03:07,000 +to the method. + +42 +00:03:07,000 --> 00:03:09,000 +So how we can make it global? + +43 +00:03:10,000 --> 00:03:10,000 +Okay. + +44 +00:03:11,000 --> 00:03:16,000 +So first of all, I'm saying global and driver. + +45 +00:03:17,000 --> 00:03:22,000 +I'm just declaring out driver, which is global. + +46 +00:03:22,000 --> 00:03:25,000 +Global means it is a global, can be used anywhere in this file. + +47 +00:03:26,000 --> 00:03:30,000 +And then we're assigning then we are creating object, which will assign to the driver. + +48 +00:03:31,000 --> 00:03:33,000 +But driver is global, so can be used anywhere. + +49 +00:03:34,000 --> 00:03:40,000 +No, these are the two lines or I said, these are the few lines which I have added in into fixture, + +50 +00:03:41,000 --> 00:03:46,000 +but I want to tell like this fixture will execute before each of the year. + +51 +00:03:46,000 --> 00:03:54,000 +So how we can set it now, go to the each of the desks and we need to pass the name of this method. + +52 +00:03:55,000 --> 00:03:57,000 +I'm just going and. + +53 +00:04:00,000 --> 00:04:07,000 +And here also, I just posted everything seems to be OK as of now, I just want to execute to appear + +54 +00:04:07,000 --> 00:04:16,000 +screen and just writing like Byte Best, we know how we can go for the execution. + +55 +00:04:16,000 --> 00:04:17,000 +So I'm executing. + +56 +00:04:17,000 --> 00:04:26,000 +Using Biotest Biotest will execute three discuses because in this file, I have three discuses and before + +57 +00:04:26,000 --> 00:04:34,000 +each of the disk it, it should execute before every disk is, it should execute it fixture, which + +58 +00:04:34,000 --> 00:04:35,000 +is going to start browser. + +59 +00:04:37,000 --> 00:04:41,000 +So here browser started and first us gets it done. + +60 +00:04:41,000 --> 00:04:46,000 +Then again, fixture is executing before the second disk is and browser starting. + +61 +00:04:46,000 --> 00:04:51,000 +Then it will execute 3rd test case and before that fixture will run. + +62 +00:04:53,000 --> 00:05:02,000 +So if you notice here we have three discuses and before each test case or before, is this case we want + +63 +00:05:02,000 --> 00:05:04,000 +to execute this fixture. + +64 +00:05:05,000 --> 00:05:11,000 +So if you notice my browser is starting means that fixture is executing before each of the desks and + +65 +00:05:11,000 --> 00:05:13,000 +in this case, we have written just maximize. + +66 +00:05:13,000 --> 00:05:18,000 +So maximizing windows working in the this case, you are to enter and maximize. + +67 +00:05:18,000 --> 00:05:20,000 +So that is working in this case. + +68 +00:05:21,000 --> 00:05:29,000 +So here we have seen if you want to execute anything before your test case, for that, we can use fixture. + +69 +00:05:30,000 --> 00:05:36,000 +OK, now after each of the test case, I want to execute something. + +70 +00:05:37,000 --> 00:05:41,000 +So after each of the risks, I want to close my browser for that. + +71 +00:05:41,000 --> 00:05:46,000 +I can go here in the fixture and mention yield. + +72 +00:05:46,000 --> 00:05:50,000 +After that, you can write the lines which you want because you could offer the disk. + +73 +00:05:51,000 --> 00:05:54,000 +So after the test case, I want to execute close browser. + +74 +00:05:55,000 --> 00:05:58,000 +So that is whatever we are writing below. + +75 +00:05:59,000 --> 00:06:02,000 +Yield is going to execute after your task is execution. + +76 +00:06:03,000 --> 00:06:04,000 +Now everything is OK. + +77 +00:06:04,000 --> 00:06:13,000 +I'm just going to execute again, and you will notice browser will be started because fixture is executing. + +78 +00:06:14,000 --> 00:06:19,000 +And let's get the code is just to enter the URL, maximize it and then close browser. + +79 +00:06:19,000 --> 00:06:23,000 +So close browsers executing big because the added. + +80 +00:06:25,000 --> 00:06:26,000 +Guilt in fiction. + +81 +00:06:28,000 --> 00:06:35,000 +So all that just case us executed and the browser is closed because we have mentioned guilt yield will + +82 +00:06:35,000 --> 00:06:39,000 +tell what all the court we want to execute after the death. + +83 +00:06:39,000 --> 00:06:45,000 +So that is before the execution and that is after this execution. + +84 +00:06:46,000 --> 00:06:52,000 +No, and one thing you need to remember that don't forget whatever the name of this method, which we + +85 +00:06:52,000 --> 00:06:58,000 +are defining as a fixture, we need to pass this method name here in all the pesquisas. + +86 +00:07:00,000 --> 00:07:07,000 +Know one thing you have noticed every time Rosa is starting first US cases any browser close browser + +87 +00:07:07,000 --> 00:07:08,000 +started again. + +88 +00:07:08,000 --> 00:07:11,000 +Second disk browser, close browser started again. + +89 +00:07:11,000 --> 00:07:18,000 +Typekit This gets us running and browser crawls, but I want to perform this task only once means only + +90 +00:07:18,000 --> 00:07:18,000 +once. + +91 +00:07:18,000 --> 00:07:21,000 +Browser to the start performs first. + +92 +00:07:21,000 --> 00:07:25,000 +Second task is to test kit and at the end, just close browser. + +93 +00:07:27,000 --> 00:07:34,000 +In that case, we can go to the fixture and we can set it scope, so the scope is equal to module. + +94 +00:07:35,000 --> 00:07:40,000 +It means now in this complete module, it will execute only once. + +95 +00:07:40,000 --> 00:07:47,000 +So this court is going to execute only once at the start, and this court is going to execute only once + +96 +00:07:47,000 --> 00:07:48,000 +at the end. + +97 +00:07:48,000 --> 00:07:55,000 +So if I execute it now, I'll just come here screen and execute. + +98 +00:07:56,000 --> 00:08:03,000 +This time you will notice browser will be started once, then all that test, whatever you have written, + +99 +00:08:04,000 --> 00:08:05,000 +will be executed. + +100 +00:08:05,000 --> 00:08:09,000 +As of now, you check it no further browser started. + +101 +00:08:09,000 --> 00:08:10,000 +Only one browser started. + +102 +00:08:10,000 --> 00:08:14,000 +Whatever the task you have written that is executing and then browser clothes. + +103 +00:08:15,000 --> 00:08:21,000 +So we have set how we can execute code every time before the disk gives. + +104 +00:08:21,000 --> 00:08:25,000 +This fixture will execute before and after each task is. + +105 +00:08:26,000 --> 00:08:31,000 +But if you mention scope, it means this fixture will execute only once. + +106 +00:08:31,000 --> 00:08:34,000 +So once it will execute, then all that gets well executed. + +107 +00:08:34,000 --> 00:08:38,000 +And at the end, this fixture yield Bart will execute. + +108 +00:08:41,000 --> 00:08:45,000 +So here in the session, we have seen what what is by this, just how we can use it. + +109 +00:08:46,000 --> 00:08:48,000 +That's all we have for the session. + +110 +00:08:48,000 --> 00:08:49,000 +Thanks for watching this video. + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/006 Assertions Compare Actual Result with Expected Result_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/006 Assertions Compare Actual Result with Expected Result_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..8a1850d9133ee46a24eed2d86abba01b23879d60 --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/006 Assertions Compare Actual Result with Expected Result_en.srt @@ -0,0 +1,176 @@ +1 +00:00:00,000 --> 00:00:05,000 +Welcome to the testing world in this session, I'll show you assertions. + +2 +00:00:06,000 --> 00:00:08,000 +So first of all, we need to understand what is a. + +3 +00:00:10,000 --> 00:00:16,000 +So in general testing you have seen we are comparing actual results with the expected result that is + +4 +00:00:16,000 --> 00:00:18,000 +required in almost all the death cases. + +5 +00:00:19,000 --> 00:00:21,000 +Here, also here in automation. + +6 +00:00:21,000 --> 00:00:24,000 +Also, we need to compare actual results with expected results. + +7 +00:00:25,000 --> 00:00:27,000 +And for doing that, we can use assertions. + +8 +00:00:28,000 --> 00:00:34,000 +So if I summarize, assertions can be used to compare actual results with expected results. + +9 +00:00:36,000 --> 00:00:40,000 +Here in brightest, if you want to make assertion, we can use a third. + +10 +00:00:41,000 --> 00:00:45,000 +So now I'll show you how we can use a search to compare something. + +11 +00:00:45,000 --> 00:00:49,000 +And here I'll just give the introduction what is a start and how we can use it. + +12 +00:00:50,000 --> 00:00:55,000 +But when we're going for actual automation there, I'm going to use a cert on many places. + +13 +00:00:56,000 --> 00:00:59,000 +So I'm just moving to my desk. + +14 +00:00:59,000 --> 00:01:06,000 +And previously we have seen I have three test cases here, so I want to in each this case, I want to + +15 +00:01:06,000 --> 00:01:07,000 +make some assertion. + +16 +00:01:08,000 --> 00:01:14,000 +So here, if you notice when my browser started, we are getting a title log in and sign up forms. + +17 +00:01:15,000 --> 00:01:20,000 +I want to fetch the title dialer dot title. + +18 +00:01:20,000 --> 00:01:24,000 +And I want to compare it with expected titles. + +19 +00:01:24,000 --> 00:01:29,000 +So I'm writing like a cert and here I'm using. + +20 +00:01:32,000 --> 00:01:33,000 +Sign up. + +21 +00:01:36,000 --> 00:01:41,000 +Just checking their salt log in and sign up forms for logging. + +22 +00:01:43,000 --> 00:01:55,000 +And sign up forms that I'm comparing here in the second Test case, I'm going to compare you to something + +23 +00:01:55,000 --> 00:02:01,000 +driver dot guarantee are and I want to compare it with. + +24 +00:02:02,000 --> 00:02:08,000 +So I'm writing like a cert and my expert, you also I'm just copying this. + +25 +00:02:10,000 --> 00:02:11,000 +And listing here. + +26 +00:02:15,000 --> 00:02:16,000 +So that's my second assertion. + +27 +00:02:17,000 --> 00:02:22,000 +So out of the three desks in two edit assertions, let's see executions. + +28 +00:02:22,000 --> 00:02:27,000 +I'm just going for the execution and let it pass or fail my desk. + +29 +00:02:27,000 --> 00:02:29,000 +And then I'll show you opposite of that. + +30 +00:02:33,000 --> 00:02:38,000 +So first US case, there's going to a second Test case, and as of now, everything is passed because + +31 +00:02:38,000 --> 00:02:39,000 +everything is matching. + +32 +00:02:40,000 --> 00:02:44,000 +Now what I do, I change this. + +33 +00:02:44,000 --> 00:02:51,000 +You are means my expectation is this which is not going to match in the same way I change my expected + +34 +00:02:51,000 --> 00:02:55,000 +item, clearing and running it now. + +35 +00:02:56,000 --> 00:03:00,000 +So this time it will compare actually with the expected, which is not going to be compared. + +36 +00:03:00,000 --> 00:03:04,000 +So it should fail to test guesses because the intruder skips. + +37 +00:03:05,000 --> 00:03:14,000 +So if you take it here out of the three to field and if you check here, it shows assertion error because + +38 +00:03:14,000 --> 00:03:21,000 +your title is not matching in the same way when more failure as our Shannara because there you are, + +39 +00:03:21,000 --> 00:03:22,000 +it is not matching. + +40 +00:03:24,000 --> 00:03:31,000 +So here we have seen how we can make assertions and what are the use of assertions in coming sessions + +41 +00:03:31,000 --> 00:03:33,000 +when we are going for actual automation? + +42 +00:03:33,000 --> 00:03:36,000 +I'll use these assertions in our test cases. + +43 +00:03:37,000 --> 00:03:39,000 +That's all we have for the session. + +44 +00:03:39,000 --> 00:03:40,000 +Tanks watching this video? + diff --git a/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/007 Write End to End Test Case in PyTest format_en.srt b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/007 Write End to End Test Case in PyTest format_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..845f5eb77d0e4cbc2da4f889d0955417dddcc9ad --- /dev/null +++ b/35 - PyTest Unit Testing Framework for Python (Use to Execute Test Cases)/007 Write End to End Test Case in PyTest format_en.srt @@ -0,0 +1,404 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +So previously, we have seen how we can take this case by using selenium and Python. + +3 +00:00:08,000 --> 00:00:18,000 +And also we have seen by Test now I'm going to write this case selenium test case using Biotest means + +4 +00:00:18,000 --> 00:00:23,000 +my test case would mean that by this format, first of all, I'm just moving to the project that we + +5 +00:00:23,000 --> 00:00:28,000 +have created previously, so I'm here on my project. + +6 +00:00:29,000 --> 00:00:35,000 +We have seen how we can work on drop down, how we can work on the radio button and then we have to + +7 +00:00:35,000 --> 00:00:36,000 +check box. + +8 +00:00:36,000 --> 00:00:39,000 +Then we have seen button link. + +9 +00:00:39,000 --> 00:00:44,000 +So we have worked on different type of elements and there's a complete test kit, which we have written + +10 +00:00:44,000 --> 00:00:45,000 +in previous sessions. + +11 +00:00:46,000 --> 00:00:50,000 +Now I want to convert this test case into the fight test format. + +12 +00:00:51,000 --> 00:00:57,000 +So first of all, we know whenever we want to take my best case to the widest format, my best guess + +13 +00:00:57,000 --> 00:01:00,000 +file name sure should start with the test. + +14 +00:01:01,000 --> 00:01:06,000 +So I'm going to this filing a right click and the effect to rename. + +15 +00:01:07,000 --> 00:01:14,000 +I'm just starting this file name with the test and then underscore. + +16 +00:01:14,000 --> 00:01:16,000 +So that's the first thing that we need to change. + +17 +00:01:17,000 --> 00:01:18,000 +Means by that is my test gets right. + +18 +00:01:20,000 --> 00:01:25,000 +Next, we know that whatever the code we are going to write in bytes format that should be inside a + +19 +00:01:25,000 --> 00:01:26,000 +function. + +20 +00:01:26,000 --> 00:01:32,000 +So what I'm doing here, I'm creating a function like def and function name. + +21 +00:01:32,000 --> 00:01:33,000 +Also start with a test. + +22 +00:01:33,000 --> 00:01:34,000 +So test. + +23 +00:01:35,000 --> 00:01:47,000 +Verify registration and all this court, I'm putting into the method now, the complete record is in + +24 +00:01:47,000 --> 00:01:48,000 +one method. + +25 +00:01:49,000 --> 00:01:52,000 +If you want to execute this, we can execute it right now. + +26 +00:01:52,000 --> 00:02:02,000 +So if I show you like, I'm just going to terminal and hit, I'm writing byte test and giving the name + +27 +00:02:02,000 --> 00:02:03,000 +of the file. + +28 +00:02:03,000 --> 00:02:05,000 +This test fetch the rock below. + +29 +00:02:06,000 --> 00:02:13,000 +As of now, it should execute because now I have one best case we have one test case, which is written + +30 +00:02:14,000 --> 00:02:15,000 +the best method. + +31 +00:02:15,000 --> 00:02:21,000 +So let it execute first and then I'll go for some more modifications. + +32 +00:02:24,000 --> 00:02:30,000 +Rather rather started going to maximize it is working on drop down list and a button. + +33 +00:02:30,000 --> 00:02:31,000 +So everything is working as of now. + +34 +00:02:33,000 --> 00:02:41,000 +No, we have seen previously whatever the code that you think that should be executed before and after + +35 +00:02:41,000 --> 00:02:44,000 +your desk is that should be inside the fixtures. + +36 +00:02:45,000 --> 00:02:53,000 +So I'm just coming here and creating one more method like death and involvement. + +37 +00:02:57,000 --> 00:03:00,000 +Setup, you can give any name to this method. + +38 +00:03:00,000 --> 00:03:01,000 +I'm just giving involvement. + +39 +00:03:02,000 --> 00:03:07,000 +And whatever the code, you think that need to be executed before the test, guess we just need to cut + +40 +00:03:07,000 --> 00:03:08,000 +it down. + +41 +00:03:08,000 --> 00:03:15,000 +So I'm just getting these lines like start boza, maximize it and putting in that different method. + +42 +00:03:17,000 --> 00:03:21,000 +But the driver object you're creating here, it's a local to the method. + +43 +00:03:22,000 --> 00:03:24,000 +So how we can make it global in previous. + +44 +00:03:24,000 --> 00:03:26,000 +I have already operated. + +45 +00:03:26,000 --> 00:03:27,000 +We can use are global. + +46 +00:03:28,000 --> 00:03:32,000 +I'm saying the driver, which I'm going to use here. + +47 +00:03:32,000 --> 00:03:34,000 +It is a global means. + +48 +00:03:34,000 --> 00:03:36,000 +It can be used in the other method as well. + +49 +00:03:36,000 --> 00:03:39,000 +So now you'll notice the problem is a result. + +50 +00:03:41,000 --> 00:03:45,000 +So here we have divided our code into the two matters. + +51 +00:03:46,000 --> 00:03:52,000 +If you want to make this matter as a fixture method, so first of all, we need to import so import + +52 +00:03:53,000 --> 00:03:55,000 +byte that we have seen in the previous session as well. + +53 +00:03:56,000 --> 00:04:01,000 +And now I'm adding a fixture like Byte Test Dot fixture. + +54 +00:04:02,000 --> 00:04:05,000 +So this method is going to behave as a fictional. + +55 +00:04:06,000 --> 00:04:12,000 +Also, we have seen if you have any code which you want to execute after your task is like this browser, + +56 +00:04:12,000 --> 00:04:13,000 +I'm going to close. + +57 +00:04:14,000 --> 00:04:20,000 +But that should be after my desk is after my desk is execution so we can use a keyword digital. + +58 +00:04:21,000 --> 00:04:24,000 +And here we can write off of the unit. + +59 +00:04:24,000 --> 00:04:29,000 +Whatever you are writing means that is going to be executed after your desk is. + +60 +00:04:29,000 --> 00:04:35,000 +Now I have converted my desk, get into the proper Buddhist moment in which we have a test method. + +61 +00:04:35,000 --> 00:04:42,000 +Also, we have created fixture means the code which is going to execute before it escapes and whatever + +62 +00:04:42,000 --> 00:04:48,000 +we have written after a yield that is going to execute after desk case, but before execution. + +63 +00:04:48,000 --> 00:04:50,000 +One minor update that I need to do. + +64 +00:04:50,000 --> 00:04:56,000 +Previously, we have seen we need to pass this fixed generally fixture method name here to the test. + +65 +00:04:58,000 --> 00:04:59,000 +Now everything is done. + +66 +00:04:59,000 --> 00:05:02,000 +I'm just going for execution. + +67 +00:05:02,000 --> 00:05:12,000 +So moving to the terminal, get a screen and I'm writing like by test and my file name is best underscore + +68 +00:05:12,000 --> 00:05:15,000 +fetch data executed. + +69 +00:05:17,000 --> 00:05:23,000 +Now it will execute my test case, but before test case, it will execute fixture, which is going to + +70 +00:05:23,000 --> 00:05:27,000 +start browser and the URL and maximize. + +71 +00:05:29,000 --> 00:05:33,000 +Then the chefs will execute, which is working on the drop down list. + +72 +00:05:35,000 --> 00:05:37,000 +And once it is done, it is executing. + +73 +00:05:38,000 --> 00:05:41,000 +It means that is after this is execution. + +74 +00:05:42,000 --> 00:05:47,000 +So now we have converted our test guest into bite just. + +75 +00:05:49,000 --> 00:05:50,000 +One more update I can do. + +76 +00:05:50,000 --> 00:05:54,000 +We have previously seen like we can use assertions. + +77 +00:05:54,000 --> 00:05:56,000 +I'm going to use a solution here. + +78 +00:05:56,000 --> 00:06:00,000 +So I want to validate you all of my page. + +79 +00:06:01,000 --> 00:06:03,000 +So if you notice that say you are, I want to match this. + +80 +00:06:03,000 --> 00:06:08,000 +So I just copied it and I'm using a search which is coming to the bite test. + +81 +00:06:09,000 --> 00:06:10,000 +First of all, I want to drill. + +82 +00:06:10,000 --> 00:06:16,000 +You are a means you are in which we are going to fetch, which we are going to pick from the browsers. + +83 +00:06:16,000 --> 00:06:17,000 +I'm writing a third. + +84 +00:06:21,000 --> 00:06:25,000 +And here I need to give divert dark current you. + +85 +00:06:26,000 --> 00:06:29,000 +And I want to validate with the expected one. + +86 +00:06:29,000 --> 00:06:30,000 +That's my expected one. + +87 +00:06:31,000 --> 00:06:34,000 +Again, going to execute. + +88 +00:06:35,000 --> 00:06:48,000 +So now we have a complete test case in which we have fixtures best case and we are also doing a comparison + +89 +00:06:48,000 --> 00:06:50,000 +of actual and expected results. + +90 +00:06:51,000 --> 00:06:54,000 +So I'm just writing like by test. + +91 +00:06:55,000 --> 00:06:58,000 +We need to right by test, not python and test. + +92 +00:07:00,000 --> 00:07:07,000 +Fetched it, though, now it should execute and do all that duties, do activities on the browser and + +93 +00:07:07,000 --> 00:07:10,000 +compare actually with expected a result. + +94 +00:07:16,000 --> 00:07:18,000 +So that is done and it is getting filled. + +95 +00:07:18,000 --> 00:07:23,000 +If you check it where it's getting filled, so it shows you are expecting this, you are. + +96 +00:07:24,000 --> 00:07:26,000 +But in actual, this is the world which is coming. + +97 +00:07:26,000 --> 00:07:34,000 +If you take it, one hash is extra were there so that we have seen how we can make assertions as well. + +98 +00:07:34,000 --> 00:07:36,000 +That's my complete desk. + +99 +00:07:37,000 --> 00:07:39,000 +And that is in the format of byte test. + +100 +00:07:41,000 --> 00:07:42,000 +That's all we have for the session. + +101 +00:07:43,000 --> 00:07:45,000 +Thanks for watching this video. + diff --git a/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/001 Forced Wait & Page Load Timeout_en.srt b/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/001 Forced Wait & Page Load Timeout_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..57278630280db37b072e2536fed55ec8cc7d1886 --- /dev/null +++ b/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/001 Forced Wait & Page Load Timeout_en.srt @@ -0,0 +1,516 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:06,000 +In this session, we are going to understand wait in September. + +3 +00:00:08,000 --> 00:00:12,000 +So first of all, we need to understand where and when we are required to go forward. + +4 +00:00:13,000 --> 00:00:20,000 +So while automating any application, it could be many situations where we need to pause out of step + +5 +00:00:20,000 --> 00:00:21,000 +for some time. + +6 +00:00:22,000 --> 00:00:26,000 +I can give us some example, like my application is ticking time. + +7 +00:00:27,000 --> 00:00:30,000 +My web page is taking time to load up the browser. + +8 +00:00:30,000 --> 00:00:31,000 +That could be one tradition. + +9 +00:00:32,000 --> 00:00:37,000 +It might be possible that I'm searching for that element, but that element is taking time to load on + +10 +00:00:37,000 --> 00:00:37,000 +the page. + +11 +00:00:38,000 --> 00:00:39,000 +That could be in the situation. + +12 +00:00:39,000 --> 00:00:47,000 +Or we can have a situation like we have seen many places like if we select country in the dropdown. + +13 +00:00:47,000 --> 00:00:51,000 +So it will take some time to load states. + +14 +00:00:51,000 --> 00:00:53,000 +I'll show you example. + +15 +00:00:53,000 --> 00:00:55,000 +I'll show you example here. + +16 +00:00:57,000 --> 00:01:03,000 +I'm just opening my first application and you will notice like I'm going to select most of what it is + +17 +00:01:03,000 --> 00:01:08,000 +not loading country here, so I'm just going to refresh the page. + +18 +00:01:09,000 --> 00:01:16,000 +So once country displayed here, so it'll take some time to display states over here, and once we select + +19 +00:01:16,000 --> 00:01:19,000 +the state, it will take some time to display still here. + +20 +00:01:19,000 --> 00:01:24,000 +So that could be a situation where we want to wait until we are getting statehood here. + +21 +00:01:24,000 --> 00:01:27,000 +Just wait for there until we are getting to be here. + +22 +00:01:27,000 --> 00:01:29,000 +Just just wait for that. + +23 +00:01:29,000 --> 00:01:37,000 +So we can have many situations where we want to pause out of step for something or for some conditions. + +24 +00:01:38,000 --> 00:01:39,000 +Now I'll come to it. + +25 +00:01:40,000 --> 00:01:42,000 +We have different type of wait. + +26 +00:01:42,000 --> 00:01:46,000 +First of all, I cover fourth grade. + +27 +00:01:47,000 --> 00:01:52,000 +So which means this way we are going to use when we know for how many seconds we won't do it. + +28 +00:01:52,000 --> 00:01:59,000 +So if I have a situation on which I want to wait exactly for 10 seconds, but for this efficient, you + +29 +00:01:59,000 --> 00:02:01,000 +must be aware what exactly you want to wait. + +30 +00:02:01,000 --> 00:02:07,000 +But if you want to wait for a specified time, then we can use force with how we can implement that. + +31 +00:02:07,000 --> 00:02:10,000 +For that, I'm just moving to my desk. + +32 +00:02:11,000 --> 00:02:14,000 +So that is a test case, which we have created privacy here. + +33 +00:02:14,000 --> 00:02:16,000 +We are starting thousand putting you all. + +34 +00:02:16,000 --> 00:02:19,000 +Then we are working on the drop down radio button. + +35 +00:02:19,000 --> 00:02:20,000 +Now I want. + +36 +00:02:23,000 --> 00:02:25,000 +Radio button check box. + +37 +00:02:25,000 --> 00:02:27,000 +And then we have button links. + +38 +00:02:28,000 --> 00:02:35,000 +So now, after selecting data into the drop down here, I want to wait for 20 seconds. + +39 +00:02:35,000 --> 00:02:39,000 +And that's a forceful way I want to implement for that. + +40 +00:02:39,000 --> 00:02:42,000 +First of all, we need to import the package at the time. + +41 +00:02:42,000 --> 00:02:43,000 +So I'm saying. + +42 +00:02:45,000 --> 00:02:45,000 +Import. + +43 +00:02:47,000 --> 00:02:49,000 +Hey, thanks. + +44 +00:02:49,000 --> 00:02:51,000 +And here we can like. + +45 +00:02:52,000 --> 00:02:55,000 +I don't sleep. + +46 +00:02:55,000 --> 00:02:56,000 +How many seconds you want to wait? + +47 +00:02:57,000 --> 00:02:58,000 +I want to wait for 26. + +48 +00:03:00,000 --> 00:03:01,000 +Everything is okay. + +49 +00:03:02,000 --> 00:03:07,000 +I'm just going to execute this and show you after selecting value in the drop down before moving to + +50 +00:03:07,000 --> 00:03:10,000 +the radio button, it will wait for this day. + +51 +00:03:10,000 --> 00:03:14,000 +So let me execute it, so I'm just opening into the terminal. + +52 +00:03:16,000 --> 00:03:18,000 +And by. + +53 +00:03:19,000 --> 00:03:21,000 +And the file name is. + +54 +00:03:25,000 --> 00:03:26,000 +Yes. + +55 +00:03:26,000 --> 00:03:28,000 +And the school, Fitch. + +56 +00:03:30,000 --> 00:03:32,000 +Did not with. + +57 +00:03:35,000 --> 00:03:37,000 +Just going for execution of this. + +58 +00:03:39,000 --> 00:03:44,000 +And now it's executing that file, which is a desk in the form of white dust. + +59 +00:03:45,000 --> 00:03:53,000 +It will start browser maximize, and after selecting the value from the dropdown, then it should wait + +60 +00:03:53,000 --> 00:03:54,000 +for 20 seconds. + +61 +00:03:56,000 --> 00:03:58,000 +But I was distracted, maximized. + +62 +00:03:59,000 --> 00:03:59,000 +No. + +63 +00:03:59,000 --> 00:04:07,000 +When you get hit in the drop zone, but not waiting for 20 seconds and only after that, only after + +64 +00:04:07,000 --> 00:04:10,000 +that, it will click on this home or office. + +65 +00:04:11,000 --> 00:04:15,000 +So that's a hard coded with what I would say forcefully. + +66 +00:04:15,000 --> 00:04:15,000 +Wait. + +67 +00:04:16,000 --> 00:04:19,000 +It was great for the number of seconds we joked you in there. + +68 +00:04:20,000 --> 00:04:22,000 +Now it works on the rest of the elements. + +69 +00:04:25,000 --> 00:04:30,000 +So everything is done here, we have seen how we can go forward forcefully and that can be done by using + +70 +00:04:30,000 --> 00:04:32,000 +time baggage. + +71 +00:04:33,000 --> 00:04:34,000 +Not sleep. + +72 +00:04:36,000 --> 00:04:37,000 +I'm just coming to. + +73 +00:04:39,000 --> 00:04:51,000 +We are importing time module inside that we have a sleep method so that we have, you know, you have + +74 +00:04:51,000 --> 00:04:56,000 +seen whenever we are executing artists, first of all, browsers started, then it put the URL. + +75 +00:04:57,000 --> 00:05:00,000 +Page is taking some time to open. + +76 +00:05:01,000 --> 00:05:03,000 +If I show you again, I'll just go. + +77 +00:05:06,000 --> 00:05:07,000 +And execute it again. + +78 +00:05:09,000 --> 00:05:13,000 +So you will notice after starting, when did it bother you at all? + +79 +00:05:14,000 --> 00:05:17,000 +It will take some time to open that beach. + +80 +00:05:18,000 --> 00:05:21,000 +If you check it here now, it will put you at a. + +81 +00:05:22,000 --> 00:05:29,000 +Now it will take some time to open that speech and this time for the very no second dose, it might + +82 +00:05:29,000 --> 00:05:37,000 +be possible tomorrow is taking 20 seconds by default, rate is already applied in selenium, in private + +83 +00:05:37,000 --> 00:05:42,000 +it like it will do it by default, 30 seconds for any page to be open. + +84 +00:05:42,000 --> 00:05:43,000 +And that could be one suggestion. + +85 +00:05:43,000 --> 00:05:46,000 +Other suggestion could be after filling that form. + +86 +00:05:46,000 --> 00:05:51,000 +I click on the submit button so it is going to open a new page or whenever. + +87 +00:05:51,000 --> 00:05:56,000 +Sometimes you click on the link, it is opening a new page, so whenever a new page is going to be loaded + +88 +00:05:56,000 --> 00:05:59,000 +by default, time for just 30 seconds. + +89 +00:06:01,000 --> 00:06:05,000 +But for whatever the reason, you want to increase or decrease the state. + +90 +00:06:06,000 --> 00:06:09,000 +We can do it by using set time. + +91 +00:06:10,000 --> 00:06:13,000 +So we need to apply this on the driver object. + +92 +00:06:13,000 --> 00:06:20,000 +So we are going to play it on one piece and by using this driver object whenever the page is going to + +93 +00:06:20,000 --> 00:06:24,000 +be opened, it will automatically apply the time which we are going to give over here. + +94 +00:06:25,000 --> 00:06:26,000 +So first of all, I'm saying. + +95 +00:06:27,000 --> 00:06:30,000 +Driver dog sick. + +96 +00:06:33,000 --> 00:06:34,000 +Page load time. + +97 +00:06:35,000 --> 00:06:36,000 +What is the time you want to set? + +98 +00:06:36,000 --> 00:06:40,000 +I just want a second one second because I want to start a second. + +99 +00:06:40,000 --> 00:06:44,000 +So vital for this 30 second, just waiting for 30 seconds to load the page. + +100 +00:06:45,000 --> 00:06:46,000 +But I have one second in one second. + +101 +00:06:46,000 --> 00:06:47,000 +It should load. + +102 +00:06:48,000 --> 00:06:52,000 +Now, if the page is not loading in one second, it should drop at a time. + +103 +00:06:52,000 --> 00:06:53,000 +An exception. + +104 +00:06:54,000 --> 00:06:58,000 +And we need to at this time out before. + +105 +00:07:00,000 --> 00:07:06,000 +Putting you out so that it will apply on this command as well, so no browser will be static and we + +106 +00:07:06,000 --> 00:07:08,000 +are buying time. + +107 +00:07:08,000 --> 00:07:08,000 +It should be one. + +108 +00:07:09,000 --> 00:07:12,000 +Then we are opening the URL again now to execute. + +109 +00:07:12,000 --> 00:07:13,000 +I'm just moving to the terminal. + +110 +00:07:14,000 --> 00:07:18,000 +By widest, and I'm just going full. + +111 +00:07:20,000 --> 00:07:21,000 +That's the school. + +112 +00:07:22,000 --> 00:07:27,000 +Fetch data, not be what now. + +113 +00:07:28,000 --> 00:07:32,000 +It should feel because I'm saying my beach should open within one second. + +114 +00:07:33,000 --> 00:07:36,000 +But here it is, not opening in the one second, so it should feel here. + +115 +00:07:37,000 --> 00:07:40,000 +Normally by default, but as we know by default, time to start. + +116 +00:07:40,000 --> 00:07:41,000 +But I have changed that. + +117 +00:07:42,000 --> 00:07:45,000 +If you check it here, it is giving the remote exception. + +118 +00:07:46,000 --> 00:07:48,000 +So we are not sitting in one second. + +119 +00:07:48,000 --> 00:07:53,000 +Normally we are giving the day more, maybe more than 30 seconds for this setting because 30 seconds + +120 +00:07:53,000 --> 00:07:53,000 +before timeout. + +121 +00:07:54,000 --> 00:07:59,000 +And if you find out my website, this is big, my web big score. + +122 +00:08:00,000 --> 00:08:03,000 +It could take more than 30 seconds so we can change it. + +123 +00:08:03,000 --> 00:08:09,000 +But as of now, I just got one so that we can see now all the time, I'll check one. + +124 +00:08:09,000 --> 00:08:12,000 +And if in one second the page is open, that's OK. + +125 +00:08:12,000 --> 00:08:16,000 +If not, it's going to throw the remote exception. + +126 +00:08:17,000 --> 00:08:22,000 +So here we have seen how we can change drought, -- load times. + +127 +00:08:23,000 --> 00:08:25,000 +By default, it's 30 seconds. + +128 +00:08:27,000 --> 00:08:28,000 +That's all we have for the session. + +129 +00:08:29,000 --> 00:08:30,000 +Thanks for watching this video. + diff --git a/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/002 Implicitly Wait Wait for Searching of an Element_en.srt b/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/002 Implicitly Wait Wait for Searching of an Element_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..aa3dd617e0ac5833b2be24b820f32fab3da45dcb --- /dev/null +++ b/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/002 Implicitly Wait Wait for Searching of an Element_en.srt @@ -0,0 +1,340 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +So previously, we have seen how we can apply for free and paid time off. + +3 +00:00:10,000 --> 00:00:13,000 +Now I'm coming to one of the most important rate, which is implicit. + +4 +00:00:14,000 --> 00:00:17,000 +So first of all, we need to understand what is the use of the employee spirit. + +5 +00:00:17,000 --> 00:00:19,000 +Then we'll check how we can apply this week. + +6 +00:00:21,000 --> 00:00:27,000 +So many insist you will find out you are writing a script in which you are locating different elements + +7 +00:00:27,000 --> 00:00:29,000 +and performing action on their. + +8 +00:00:30,000 --> 00:00:35,000 +When you execute, that script, got filled and you got exception. + +9 +00:00:35,000 --> 00:00:37,000 +No such element exception. + +10 +00:00:38,000 --> 00:00:39,000 +Exception choose. + +11 +00:00:40,000 --> 00:00:43,000 +The element you are searching does not exist. + +12 +00:00:44,000 --> 00:00:50,000 +Now you go to the application and try try to find out the locator, but you check my look at drawers, + +13 +00:00:50,000 --> 00:00:50,000 +correct? + +14 +00:00:51,000 --> 00:00:52,000 +Still, it is getting feel. + +15 +00:00:53,000 --> 00:00:55,000 +In that kind of situation. + +16 +00:00:56,000 --> 00:01:00,000 +So in that kind of situation, when you look, it is correct, but still we are getting that exception. + +17 +00:01:02,000 --> 00:01:09,000 +These could be when the prime what is going to such that element on the page, the page does not know + +18 +00:01:09,000 --> 00:01:10,000 +completely. + +19 +00:01:11,000 --> 00:01:17,000 +So in that kind of case, the private is not able to find out that element and we are getting this exception, + +20 +00:01:17,000 --> 00:01:19,000 +that would be one reason we can have a number of reasons. + +21 +00:01:20,000 --> 00:01:27,000 +But now you want to instruct the driver if you're not able to search for element, just remove it for + +22 +00:01:27,000 --> 00:01:27,000 +some time. + +23 +00:01:28,000 --> 00:01:35,000 +And only after that if you're not able to find out the element within a given time only after that that + +24 +00:01:35,000 --> 00:01:35,000 +it feel. + +25 +00:01:37,000 --> 00:01:43,000 +So now I want to instruct the driver, if you are not able to find out the element, don't fit immediately, + +26 +00:01:44,000 --> 00:01:52,000 +wait for something where that element if after the fuel time is not exist, then you know, I'll show + +27 +00:01:52,000 --> 00:01:56,000 +you how we can implement this for implementing this. + +28 +00:01:56,000 --> 00:01:59,000 +I can go for a week, which is implicitly we. + +29 +00:02:01,000 --> 00:02:04,000 +I'm just going to my project that the privacy. + +30 +00:02:06,000 --> 00:02:09,000 +And here are the moving first of all this time. + +31 +00:02:10,000 --> 00:02:11,000 +That we have seen previously. + +32 +00:02:12,000 --> 00:02:14,000 +Also, I'm removing this false read. + +33 +00:02:15,000 --> 00:02:16,000 +No. + +34 +00:02:17,000 --> 00:02:23,000 +To verify this, what I can do it, I'm passing incorrect element locators. + +35 +00:02:25,000 --> 00:02:29,000 +By default, for locating an element of time focused zero seconds. + +36 +00:02:30,000 --> 00:02:33,000 +So if it is not able to find out that element, it will immediately fail. + +37 +00:02:34,000 --> 00:02:39,000 +Let me show you, I'm just going to mean again. + +38 +00:02:40,000 --> 00:02:42,000 +And by dust. + +39 +00:02:44,000 --> 00:02:48,000 +And go fetch the doctor, be with. + +40 +00:02:52,000 --> 00:02:59,000 +That did execute, and it will show failure immediately because there is no great mention and this look, + +41 +00:02:59,000 --> 00:02:59,000 +it is incorrect. + +42 +00:03:00,000 --> 00:03:04,000 +I just want to show you how implicitly it is going to work. + +43 +00:03:04,000 --> 00:03:08,000 +So, as noted, is a genius and by default, it does not exist. + +44 +00:03:08,000 --> 00:03:10,000 +Element doesn't exist immediately. + +45 +00:03:10,000 --> 00:03:10,000 +Failure. + +46 +00:03:10,000 --> 00:03:13,000 +If you check it, here it is getting fuel. + +47 +00:03:13,000 --> 00:03:14,000 +No such element. + +48 +00:03:16,000 --> 00:03:21,000 +No, I want this truck driver wait for some time. + +49 +00:03:21,000 --> 00:03:28,000 +If you're not able to find out that element, which is also applied to the driver object, so whenever + +50 +00:03:28,000 --> 00:03:33,000 +we are going to use the same driver object it will applicable means this implicitly, which will be + +51 +00:03:33,000 --> 00:03:33,000 +applied. + +52 +00:03:35,000 --> 00:03:41,000 +On one place and will be applicable on all the finite element commands, so I'm just coming here, but + +53 +00:03:41,000 --> 00:03:42,000 +I haven't thought. + +54 +00:03:43,000 --> 00:03:47,000 +Implicitly read and I want to wait for. + +55 +00:03:49,000 --> 00:03:50,000 +20 seconds. + +56 +00:03:52,000 --> 00:03:53,000 +Everything is okay. + +57 +00:03:53,000 --> 00:03:55,000 +I've just come to. + +58 +00:03:58,000 --> 00:03:58,000 +Terminal. + +59 +00:03:59,000 --> 00:04:01,000 +And again, the commanders by test. + +60 +00:04:05,000 --> 00:04:09,000 +On the school switch, do not be late. + +61 +00:04:10,000 --> 00:04:16,000 +I'm executing this this time the elements did not exist, but it will not fail it immediately. + +62 +00:04:17,000 --> 00:04:20,000 +It will wait for 20 seconds for that element. + +63 +00:04:20,000 --> 00:04:24,000 +If after 20 seconds, that element does not exist is going to give me error. + +64 +00:04:26,000 --> 00:04:31,000 +So let it executed first here rather started maximize. + +65 +00:04:32,000 --> 00:04:34,000 +And if we check it, it is not failing here. + +66 +00:04:34,000 --> 00:04:38,000 +It is waiting for 20 seconds and only after that it will fail. + +67 +00:04:38,000 --> 00:04:39,000 +It did not fail. + +68 +00:04:40,000 --> 00:04:41,000 +So we have you. + +69 +00:04:41,000 --> 00:04:48,000 +The maximum time of maximum time means if after 10 second it find that element so it will not wait for + +70 +00:04:48,000 --> 00:04:50,000 +next 10 seconds. + +71 +00:04:51,000 --> 00:04:54,000 +No, if the element does not find it out in 20 seconds. + +72 +00:04:55,000 --> 00:04:57,000 +That's going to feel after six. + +73 +00:04:58,000 --> 00:05:05,000 +So here the time out, which we have given is a maximum timeout, maximum time out means if the element + +74 +00:05:06,000 --> 00:05:11,000 +if we don't find this element after five seconds, it will not wait for the next 15 seconds. + +75 +00:05:11,000 --> 00:05:19,000 +But if it does not find out if it ever did not find out that element within 20 seconds, then it is + +76 +00:05:19,000 --> 00:05:20,000 +going to feel. + +77 +00:05:21,000 --> 00:05:29,000 +So mainly implicitly, it is used when you want to instruct the driver to wait for some time while searching + +78 +00:05:29,000 --> 00:05:32,000 +for the element or while finding a fourth element. + +79 +00:05:32,000 --> 00:05:40,000 +So we need to understand that use of each and every bit the use of implicitly, which is to check existence + +80 +00:05:40,000 --> 00:05:40,000 +of the element. + +81 +00:05:41,000 --> 00:05:45,000 +So here we are using implicitly it, and that is applied on one place. + +82 +00:05:45,000 --> 00:05:49,000 +It will be happily applicable to all find element commands. + +83 +00:05:51,000 --> 00:05:55,000 +So here we see what is the use of it and how we can set it? + +84 +00:05:56,000 --> 00:05:58,000 +That's all we have for the session. + +85 +00:05:59,000 --> 00:06:00,000 +Thanks for watching this video. + diff --git a/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/003 Explicit Wait Wait for condition to be True_en.srt b/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/003 Explicit Wait Wait for condition to be True_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..b8965f12ebe66ab7683b5b249f24f99e31d7176d --- /dev/null +++ b/36 - Waits in WebDriver (Page Load Timeout, Implicit Wait, Explicit Wait)/003 Explicit Wait Wait for condition to be True_en.srt @@ -0,0 +1,480 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:05,000 +So previously we have seen implicitly wait, wait, wait. + +3 +00:00:06,000 --> 00:00:08,000 +And also we have seen Padilla time out. + +4 +00:00:08,000 --> 00:00:12,000 +Then I'm going to go for one more important wait, which is explicit. + +5 +00:00:12,000 --> 00:00:20,000 +Wait, if you remember about implicitly it so implicitly it is working on existence of the element means + +6 +00:00:20,000 --> 00:00:25,000 +we are checking if the element is not there, then then just wait here. + +7 +00:00:26,000 --> 00:00:34,000 +Explicit wait work on the property of the element means element is there, but it is unable or not. + +8 +00:00:34,000 --> 00:00:35,000 +It is clickable or not. + +9 +00:00:36,000 --> 00:00:39,000 +Some text is present in the element or not. + +10 +00:00:39,000 --> 00:00:45,000 +So we are going to work on the property of the element whenever we want to wait for property of the + +11 +00:00:45,000 --> 00:00:52,000 +element to be change or some specific condition on that element to be perform, then we will have to + +12 +00:00:52,000 --> 00:00:58,000 +go for explicit with example of the explicit way it could be like we are checking the element, get, + +13 +00:00:58,000 --> 00:01:05,000 +enable that element, get, disable, wait till next present so we can have a number of situations. + +14 +00:01:06,000 --> 00:01:06,000 +What? + +15 +00:01:06,000 --> 00:01:10,000 +I'll show you one example here on my application. + +16 +00:01:10,000 --> 00:01:18,000 +We have these problems, and if I refresh this application, I'll show you here. + +17 +00:01:18,000 --> 00:01:26,000 +First of all, when we go to select country after setting country, it will take some time for states + +18 +00:01:26,000 --> 00:01:27,000 +to be populated. + +19 +00:01:27,000 --> 00:01:33,000 +But if we automate the scenario by using the driver, it will select country and immediately it will + +20 +00:01:33,000 --> 00:01:35,000 +go to the states to select. + +21 +00:01:35,000 --> 00:01:37,000 +But it is not there because they're slotting. + +22 +00:01:38,000 --> 00:01:42,000 +By default, the driver will throw exception like the particular data does not exist. + +23 +00:01:43,000 --> 00:01:47,000 +Let me show you, I'm just moving to the project that we have created previously. + +24 +00:01:48,000 --> 00:01:52,000 +And as of now, I just want to work on the element, so. + +25 +00:01:54,000 --> 00:01:59,000 +I want to work on gun trade, so I'm just locating this. + +26 +00:02:02,000 --> 00:02:07,000 +And that's my idea, I'm going to use controversy. + +27 +00:02:09,000 --> 00:02:09,000 +Yeah. + +28 +00:02:10,000 --> 00:02:19,000 +And I'm going to select aubJeot Dot Select by visible text, which is India. + +29 +00:02:19,000 --> 00:02:23,000 +I want to select India from this, from this problem. + +30 +00:02:25,000 --> 00:02:32,000 +Then I want to work on state, so I'm just going there and look getting started with this data. + +31 +00:02:35,000 --> 00:02:38,000 +So I'm writing the same lines for the state. + +32 +00:02:40,000 --> 00:02:44,000 +And here I need to give I.D.. + +33 +00:02:47,000 --> 00:02:53,000 +And I want to select Delhi here now, as of now, there's no wait here. + +34 +00:02:54,000 --> 00:02:56,000 +Clear screen and going to execute. + +35 +00:02:58,000 --> 00:03:01,000 +No, after selecting country, it should. + +36 +00:03:02,000 --> 00:03:05,000 +It will go to the state and try to select state. + +37 +00:03:07,000 --> 00:03:10,000 +But still does not exist over there. + +38 +00:03:10,000 --> 00:03:17,000 +We can understand because it's taking some time to load states so it will not fall the text it will + +39 +00:03:17,000 --> 00:03:18,000 +throw at her. + +40 +00:03:19,000 --> 00:03:20,000 +So let me show you. + +41 +00:03:22,000 --> 00:03:25,000 +Here maximized. + +42 +00:03:26,000 --> 00:03:27,000 +And it is throwing error. + +43 +00:03:28,000 --> 00:03:31,000 +So if you check it here, the error it. + +44 +00:03:32,000 --> 00:03:33,000 +No such element. + +45 +00:03:34,000 --> 00:03:36,000 +It is giving it is not able to find out that element. + +46 +00:03:36,000 --> 00:03:36,000 +OK? + +47 +00:03:38,000 --> 00:03:43,000 +We are getting no such a limited exception just because here I should give it because we are locating + +48 +00:03:43,000 --> 00:03:44,000 +it by the name. + +49 +00:03:45,000 --> 00:03:51,000 +So I'm just giving like I.D. and also I'm giving it here. + +50 +00:03:51,000 --> 00:04:01,000 +So now I'm making my driver, not implicitly where it is commented, I'm just going to execute it one + +51 +00:04:01,000 --> 00:04:01,000 +more time. + +52 +00:04:03,000 --> 00:04:06,000 +Now I'll check what is the exception we are going to get. + +53 +00:04:09,000 --> 00:04:10,000 +Brother started. + +54 +00:04:13,000 --> 00:04:14,000 +Maximized. + +55 +00:04:16,000 --> 00:04:17,000 +It is. + +56 +00:04:19,000 --> 00:04:24,000 +Could not look gate element with the visible text like this. + +57 +00:04:24,000 --> 00:04:28,000 +It is not able to first, it is not able to locate India. + +58 +00:04:29,000 --> 00:04:33,000 +If you check it here first time, it is also taking some time to load. + +59 +00:04:33,000 --> 00:04:35,000 +So it is not able to find out India. + +60 +00:04:35,000 --> 00:04:36,000 +So I need to go forward. + +61 +00:04:37,000 --> 00:04:40,000 +No, no element is there, but is not able to find out the text. + +62 +00:04:40,000 --> 00:04:46,000 +So now I'll go over the explicit route for explicit where we are going to use a class with the name + +63 +00:04:46,000 --> 00:04:47,000 +of the driver. + +64 +00:04:47,000 --> 00:04:47,000 +Wait. + +65 +00:04:47,000 --> 00:04:58,000 +So first of all, I need to import that from Selenium Dot Web Privat Dot Support Dot that import web + +66 +00:04:58,000 --> 00:04:59,000 +driver. + +67 +00:04:59,000 --> 00:04:59,000 +Wait. + +68 +00:05:00,000 --> 00:05:02,000 +Also, we need to go for expected conditions. + +69 +00:05:02,000 --> 00:05:14,000 +I'm seeing import selenium dot web, prior work dot support dot expected conditions as easy, just given + +70 +00:05:14,000 --> 00:05:16,000 +the short name of this. + +71 +00:05:18,000 --> 00:05:23,000 +Now here I'm just coming and I need to use web driver wait here. + +72 +00:05:23,000 --> 00:05:27,000 +So first of all, we need to create object of that something which is equal to. + +73 +00:05:30,000 --> 00:05:37,000 +The driver, wait, did we need to pass object of the driver, some passing like this? + +74 +00:05:38,000 --> 00:05:40,000 +And second, I need to pass. + +75 +00:05:40,000 --> 00:05:43,000 +How many seconds maximum time do you want to give? + +76 +00:05:43,000 --> 00:05:50,000 +So I'm just giving 100 known for which condition you want to which I want. + +77 +00:05:50,000 --> 00:05:51,000 +Wait, wait. + +78 +00:05:51,000 --> 00:05:56,000 +Not until and my expected condition too easy. + +79 +00:05:57,000 --> 00:06:07,000 +Dot X to be present in element, I want to check a particular text present in the element or not. + +80 +00:06:08,000 --> 00:06:10,000 +Now we need to locate that element. + +81 +00:06:10,000 --> 00:06:12,000 +So I'm saying, look it bye bye. + +82 +00:06:12,000 --> 00:06:13,000 +So we need to import. + +83 +00:06:13,000 --> 00:06:16,000 +Buyers will buy the class. + +84 +00:06:16,000 --> 00:06:17,000 +So from. + +85 +00:06:20,000 --> 00:06:27,000 +Selenium dot web, divert dot com dot by import. + +86 +00:06:28,000 --> 00:06:28,000 +By. + +87 +00:06:30,000 --> 00:06:33,000 +First, I'm saying, look it by. + +88 +00:06:35,000 --> 00:06:40,000 +I.D., I want to look at my I.D. and what is the idea of this? + +89 +00:06:40,000 --> 00:06:42,000 +So I'm seeing I.D. is. + +90 +00:06:48,000 --> 00:06:49,000 +This. + +91 +00:06:51,000 --> 00:06:57,000 +So first of all, I'm saying expect it conditional tax to be present in the element, first of all, + +92 +00:06:58,000 --> 00:07:03,000 +I'm saying next to be present in the element as a first argument. + +93 +00:07:04,000 --> 00:07:05,000 +Look at this element. + +94 +00:07:05,000 --> 00:07:09,000 +And second argument, what do you want to look at? + +95 +00:07:09,000 --> 00:07:11,000 +I want to look at India. + +96 +00:07:13,000 --> 00:07:14,000 +Everything is done. + +97 +00:07:16,000 --> 00:07:19,000 +And I should go for execution now. + +98 +00:07:30,000 --> 00:07:30,000 +Just. + +99 +00:07:32,000 --> 00:07:33,000 +Going to the terminal + +100 +00:07:36,000 --> 00:07:42,000 +and bite test best underscore fetch. + +101 +00:07:45,000 --> 00:07:49,000 +Clear screen by test that underscore fetch. + +102 +00:07:52,000 --> 00:07:59,000 +Data not be maximized, browser maximized. + +103 +00:07:59,000 --> 00:08:02,000 +It has selected India, but now it's failing on Delhi. + +104 +00:08:03,000 --> 00:08:11,000 +So in the same way, I just copied this line, these two lines and I'm going to state. + +105 +00:08:13,000 --> 00:08:15,000 +And same thing like I want to check. + +106 +00:08:21,000 --> 00:08:30,000 +I'm seeing business did drop down, is having daily, just wait for it. + +107 +00:08:30,000 --> 00:08:38,000 +Once we got it just selected now executing the same script with explicit wait. + +108 +00:08:38,000 --> 00:08:42,000 +Now first it will wait for India in the country problem. + +109 +00:08:43,000 --> 00:08:46,000 +Then it will wait for Delhi in the state dropdown. + +110 +00:08:47,000 --> 00:08:51,000 +And once it is it, get these, it will select it and move forward. + +111 +00:09:03,000 --> 00:09:09,000 +So Browser Open, Maximize Node, selected India and waiting for states to be played and now selected + +112 +00:09:09,000 --> 00:09:10,000 +state and then move forward. + +113 +00:09:13,000 --> 00:09:18,000 +So here we have seen how we can go for explicit wait for different conditions and conditions could be + +114 +00:09:18,000 --> 00:09:20,000 +anything we have seen here. + +115 +00:09:20,000 --> 00:09:27,000 +I have applied on the condition where it is waiting for next to be present in element. + +116 +00:09:29,000 --> 00:09:36,000 +So here we have seen only one condition, but we can apply this on many conditions like tidal contains + +117 +00:09:36,000 --> 00:09:38,000 +present of the element visibility of the element. + +118 +00:09:38,000 --> 00:09:45,000 +So we have different options which we can used for for applying explicit weight. + +119 +00:09:46,000 --> 00:09:48,000 +That's all we have for the session. + +120 +00:09:49,000 --> 00:09:50,000 +Thanks watching this video. + diff --git a/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/001 Take Screenshot at Runtime - Take and Save screenshot for reference_en.srt b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/001 Take Screenshot at Runtime - Take and Save screenshot for reference_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..538196d4bca991cd405b6ed06bd2bf8b85251a92 --- /dev/null +++ b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/001 Take Screenshot at Runtime - Take and Save screenshot for reference_en.srt @@ -0,0 +1,308 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the wrestling world. + +2 +00:00:03,000 --> 00:00:07,000 +In this session, I'll show you how we can take screenshot at renting. + +3 +00:00:08,000 --> 00:00:15,000 +So while ring automation, we need to take a screenshot on many places, I give an example like I'm + +4 +00:00:15,000 --> 00:00:20,000 +executing a script and somewhere my actual result is not matching with the expected result. + +5 +00:00:21,000 --> 00:00:26,000 +So in that case, I need to take a screenshot so that later on, when I'm going to report a book, I + +6 +00:00:26,000 --> 00:00:28,000 +can use that a screenshot. + +7 +00:00:29,000 --> 00:00:32,000 +In the same way, sometimes my script is getting buzz. + +8 +00:00:33,000 --> 00:00:37,000 +I just want to keep a proof with myself that this test was was. + +9 +00:00:38,000 --> 00:00:39,000 +So I have to take a screenshot. + +10 +00:00:39,000 --> 00:00:43,000 +Even the best was buzzed, so it might be possible. + +11 +00:00:43,000 --> 00:00:44,000 +We need to take a screenshot in many places. + +12 +00:00:45,000 --> 00:00:47,000 +Now I'll show you how we can take it. + +13 +00:00:47,000 --> 00:00:50,000 +It's just a one line of code it in line with Python. + +14 +00:00:51,000 --> 00:00:53,000 +First of all, I'm just moving to my desk. + +15 +00:00:54,000 --> 00:00:59,000 +And here we are, just I have just written a very simple skit in which we are just starting the browser + +16 +00:01:00,000 --> 00:01:06,000 +Chrome browser maximize window and just put the URL I'm showing you by executing this. + +17 +00:01:06,000 --> 00:01:08,000 +And after that, I'll take the screenshot. + +18 +00:01:10,000 --> 00:01:11,000 +So her probably started. + +19 +00:01:12,000 --> 00:01:13,000 +Maximize. + +20 +00:01:15,000 --> 00:01:16,000 +What do you earn in that? + +21 +00:01:18,000 --> 00:01:19,000 +And that is done. + +22 +00:01:20,000 --> 00:01:22,000 +That's the best gift we have written as of now. + +23 +00:01:23,000 --> 00:01:28,000 +Now I want to take a screenshot for taking the screenshot we have we haven't met through the name get + +24 +00:01:29,000 --> 00:01:33,000 +screenshot and here we we have different methods. + +25 +00:01:33,000 --> 00:01:36,000 +I'm just letting get a screenshot X-File. + +26 +00:01:36,000 --> 00:01:42,000 +So where very want to see what we need to give the file, but I want to say it in the same project folder. + +27 +00:01:42,000 --> 00:01:45,000 +So I'm just taking the part of my project. + +28 +00:01:46,000 --> 00:01:55,000 +Like this and here, and I want to give the name of the file is off before. + +29 +00:01:57,000 --> 00:02:05,000 +Registration start, Benji, so I'm just reducing the size of this so we can see the complete script. + +30 +00:02:06,000 --> 00:02:13,000 +So here I'm taking the screenshot it into the project folder and the name is before registration Rotberg, + +31 +00:02:13,000 --> 00:02:17,000 +as we know, whenever we are giving birth on place of backwards. + +32 +00:02:18,000 --> 00:02:20,000 +I'm just giving forward slash. + +33 +00:02:24,000 --> 00:02:29,000 +That is done again, going to execute the right pick and run. + +34 +00:02:36,000 --> 00:02:37,000 +So that is done. + +35 +00:02:38,000 --> 00:02:42,000 +And if I check here, you will get a file with the name before registration dot the. + +36 +00:02:43,000 --> 00:02:44,000 +I just double click on this. + +37 +00:02:44,000 --> 00:02:47,000 +And if you notice the screenshots here. + +38 +00:02:50,000 --> 00:02:54,000 +So here we have seen how we can take a screenshot in our automation. + +39 +00:02:56,000 --> 00:03:02,000 +As we know, this code or out of the screenshot code would be required on many places. + +40 +00:03:02,000 --> 00:03:06,000 +So what option is that wherever required, just write this one line of code. + +41 +00:03:06,000 --> 00:03:10,000 +Second is that we are not writing this code on every file. + +42 +00:03:11,000 --> 00:03:14,000 +We are just calling some method which will take screenshot. + +43 +00:03:14,000 --> 00:03:15,000 +So what we can do? + +44 +00:03:15,000 --> 00:03:20,000 +I'm just creating one more file and there's a Python file that I'm creating. + +45 +00:03:21,000 --> 00:03:24,000 +I just given the name like a screenshot. + +46 +00:03:26,000 --> 00:03:27,000 +OK. + +47 +00:03:27,000 --> 00:03:29,000 +Yeah, I'm quoting him method like if. + +48 +00:03:30,000 --> 00:03:30,000 +Dick. + +49 +00:03:32,000 --> 00:03:34,000 +Page screenshot. + +50 +00:03:37,000 --> 00:03:43,000 +And I'm just asking for the name which you want to use for saving this screenshot. + +51 +00:03:44,000 --> 00:03:48,000 +No, I'm just cutting the cord, so that was the cord. + +52 +00:03:50,000 --> 00:03:56,000 +If you know, we're taking the screenshot, we need driver object and also we need screenshot. + +53 +00:03:56,000 --> 00:04:03,000 +So I'm saying, first of all, saying the driver object and then the name of the screenshot, and here + +54 +00:04:03,000 --> 00:04:05,000 +I'm passing name. + +55 +00:04:06,000 --> 00:04:10,000 +So that's the script that I have written and to call it. + +56 +00:04:10,000 --> 00:04:12,000 +I'm just moving to my desk. + +57 +00:04:12,000 --> 00:04:15,000 +So here what we are doing, that's a path. + +58 +00:04:15,000 --> 00:04:22,000 +Then the name of the file and extensions dot PMG name will be passed from the desk is. + +59 +00:04:24,000 --> 00:04:28,000 +Now I'm coming to the first kiss, and first of all. + +60 +00:04:31,000 --> 00:04:32,000 +Import. + +61 +00:04:34,000 --> 00:04:40,000 +Take screenshot and to call my screenshot dot big, which are private objects we need to pass. + +62 +00:04:41,000 --> 00:04:47,000 +That's my driver object and the name I'm seeing first screenshot. + +63 +00:04:50,000 --> 00:04:55,000 +Just running it, so now it will take a screenshot again, but this time we have written a separate + +64 +00:04:55,000 --> 00:04:58,000 +method wherever required, we'll just call it. + +65 +00:05:05,000 --> 00:05:11,000 +I'm just coming here, and if you check here we have Benji. + +66 +00:05:12,000 --> 00:05:13,000 +And that is open. + +67 +00:05:15,000 --> 00:05:21,000 +So here we have seen how we can write code for taking the screenshot at one time. + +68 +00:05:22,000 --> 00:05:24,000 +One option is that you're writing in the desk itself. + +69 +00:05:24,000 --> 00:05:29,000 +Another option is that you're writing in a separate file as a matter when required. + +70 +00:05:29,000 --> 00:05:33,000 +We are just calling that method and it will take that screenshot. + +71 +00:05:35,000 --> 00:05:40,000 +And here that method is important because it is taking forever object, because for taking the screenshot, + +72 +00:05:40,000 --> 00:05:41,000 +we need a driver object. + +73 +00:05:42,000 --> 00:05:44,000 +And second is the name of the file, which you want to give. + +74 +00:05:45,000 --> 00:05:50,000 +So here that's a part, and that's the name Dr. Bianchi. + +75 +00:05:52,000 --> 00:05:56,000 +So here in this session, we have seen how to take a screenshot at runtime. + +76 +00:05:57,000 --> 00:05:58,000 +That's all we have for the session. + +77 +00:05:59,000 --> 00:06:00,000 +Watching this video? + diff --git a/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/002 Execute JavaScript at Runtime Handle complex HTML scenario_en.srt b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/002 Execute JavaScript at Runtime Handle complex HTML scenario_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..4ccf14e6dd3aebf43432e0cfd1fd93e86d5ffd4a --- /dev/null +++ b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/002 Execute JavaScript at Runtime Handle complex HTML scenario_en.srt @@ -0,0 +1,304 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the distant world. + +2 +00:00:02,000 --> 00:00:08,000 +In this session, we are going to cover how we can execute JavaScript insulin with Python. + +3 +00:00:09,000 --> 00:00:14,000 +So first of all, we need to understand why we are going to execute JavaScript, what's a need of executing + +4 +00:00:14,000 --> 00:00:15,000 +JavaScript? + +5 +00:00:16,000 --> 00:00:18,000 +So I'm just moving to bite them. + +6 +00:00:19,000 --> 00:00:23,000 +And here I have written a very simple test case in which we are just starting browser. + +7 +00:00:24,000 --> 00:00:25,000 +We are maximizing window. + +8 +00:00:25,000 --> 00:00:26,000 +And we are putting some URL. + +9 +00:00:27,000 --> 00:00:33,000 +Let me execute this, and then I'll show you what is a need of JavaScript? + +10 +00:00:34,000 --> 00:00:35,000 +In selenium. + +11 +00:00:36,000 --> 00:00:39,000 +So browsers started going to be maximized. + +12 +00:00:40,000 --> 00:00:42,000 +And Ukraine is open. + +13 +00:00:43,000 --> 00:00:47,000 +That's the simple test, which is executed, no. + +14 +00:00:47,000 --> 00:00:51,000 +If you notice we are getting is scrollbar on this page. + +15 +00:00:52,000 --> 00:00:57,000 +And I want to scroll down for whatever the reason I want to scroll down. + +16 +00:00:58,000 --> 00:01:01,000 +But this is scrollbar is not a part of the page. + +17 +00:01:01,000 --> 00:01:02,000 +It's a part of the browser. + +18 +00:01:03,000 --> 00:01:07,000 +If it is not part of the page means it will not have any HTML. + +19 +00:01:07,000 --> 00:01:13,000 +So if the scroll bar is not having any HTML, then we cannot automate this using selenium. + +20 +00:01:15,000 --> 00:01:19,000 +And sometimes you will notice, as we are struggling down, then the rest of the pages are loading. + +21 +00:01:20,000 --> 00:01:27,000 +You have seen in the Facebook wall when we take when you take your roll bar down, then bottom part + +22 +00:01:27,000 --> 00:01:29,000 +of the beach, start loading. + +23 +00:01:29,000 --> 00:01:35,000 +So we have a kind of situation where we want to scroll down, but that cannot be done by this, by this + +24 +00:01:35,000 --> 00:01:36,000 +millennium. + +25 +00:01:36,000 --> 00:01:37,000 +Then how we can do it. + +26 +00:01:38,000 --> 00:01:43,000 +So whatever the task you want to perform on the browser, you can do by using JavaScript. + +27 +00:01:44,000 --> 00:01:45,000 +I'm not OK with the page. + +28 +00:01:45,000 --> 00:01:52,000 +We are talking about browser because the scroll bar is also the part of the browser so that can be handled + +29 +00:01:52,000 --> 00:01:54,000 +by the JavaScript. + +30 +00:01:55,000 --> 00:01:57,000 +So here that's a specific situation. + +31 +00:01:57,000 --> 00:02:02,000 +But whenever required, you can use JavaScript in your Python code. + +32 +00:02:02,000 --> 00:02:04,000 +You can execute JavaScript in your stadium. + +33 +00:02:05,000 --> 00:02:06,000 +They knew with Python code. + +34 +00:02:07,000 --> 00:02:08,000 +I'm just coming here. + +35 +00:02:09,000 --> 00:02:17,000 +And for executing JavaScript, I'm just writing like Driver Dart and we hear it, does it matter? + +36 +00:02:17,000 --> 00:02:20,000 +We just execute script. + +37 +00:02:20,000 --> 00:02:27,000 +So here in executive script, we need to write a script for scrolling down as we are not aware about + +38 +00:02:27,000 --> 00:02:30,000 +JavaScript, then how to how to write it. + +39 +00:02:30,000 --> 00:02:34,000 +For that, you'll have to go to the Google and you will have to search like JavaScript for scrolling + +40 +00:02:34,000 --> 00:02:35,000 +down. + +41 +00:02:35,000 --> 00:02:37,000 +Because here we are learning Python. + +42 +00:02:37,000 --> 00:02:38,000 +We are not learning JavaScript. + +43 +00:02:38,000 --> 00:02:45,000 +So if you are not aware about to search on the Google, so here I'm writing one JavaScript for scrolling + +44 +00:02:45,000 --> 00:02:45,000 +down the window. + +45 +00:02:45,000 --> 00:02:47,000 +Talk Scroll. + +46 +00:02:48,000 --> 00:02:53,000 +Two, and we need to pass two argument first, what a gentle, strong. + +47 +00:02:53,000 --> 00:02:55,000 +So I don't want to go for the horizontal scroll. + +48 +00:02:56,000 --> 00:02:57,000 +Second vertical scroll. + +49 +00:02:57,000 --> 00:03:01,000 +So I want to draw down for 400 pixels. + +50 +00:03:03,000 --> 00:03:08,000 +And here, the line of the JavaScript, which is this is ended. + +51 +00:03:08,000 --> 00:03:09,000 +I put semicolon. + +52 +00:03:10,000 --> 00:03:15,000 +So we have written one line of code which is going to sprawl your window, which is going to execute + +53 +00:03:15,000 --> 00:03:22,000 +the JavaScript, which will crawl your window for 400 pixels you had first argument is horizontal scroll. + +54 +00:03:22,000 --> 00:03:24,000 +So if we check it, we don't have any horizontal scroll. + +55 +00:03:25,000 --> 00:03:27,000 +And second is a vertical scroll. + +56 +00:03:27,000 --> 00:03:31,000 +So I want to go for vertical sprawl of 400 pixels. + +57 +00:03:33,000 --> 00:03:35,000 +Just executing it one more time. + +58 +00:03:43,000 --> 00:03:47,000 +If you notice that, scroll down here, you can check that is them. + +59 +00:03:49,000 --> 00:03:55,000 +So here we have seen how we can execute JavaScript in leading with Python, so you can execute. + +60 +00:03:55,000 --> 00:03:57,000 +You can write and execute any JavaScript code. + +61 +00:03:58,000 --> 00:04:00,000 +As of now, we have written only one line. + +62 +00:04:00,000 --> 00:04:02,000 +If you have more than one line of JavaScript code. + +63 +00:04:03,000 --> 00:04:08,000 +Just remember all the lines are separated by this semicolon. + +64 +00:04:08,000 --> 00:04:10,000 +So if you have two lines, I'm just taking example. + +65 +00:04:11,000 --> 00:04:12,000 +So we'll have to write like this. + +66 +00:04:13,000 --> 00:04:15,000 +That's my first line, semicolon. + +67 +00:04:15,000 --> 00:04:18,000 +That's that's the second line again, semicolon. + +68 +00:04:18,000 --> 00:04:21,000 +And then third line, fourth lines or whatever the lines you won't write. + +69 +00:04:21,000 --> 00:04:23,000 +You can separate by that semicolon. + +70 +00:04:25,000 --> 00:04:32,000 +So the indecision we have seen, how we can execute JavaScript code to signing with Python and also + +71 +00:04:32,000 --> 00:04:33,000 +we have seen what is the need of that. + +72 +00:04:33,000 --> 00:04:38,000 +So whatever the activity you want to perform with the browser that cannot be automated by the selenium + +73 +00:04:38,000 --> 00:04:44,000 +because selenium is going to automate only the page page means only the estimate. + +74 +00:04:44,000 --> 00:04:46,000 +What browser is not a part of the page? + +75 +00:04:46,000 --> 00:04:51,000 +So if you won't perform any task on the browser, you can do by using JavaScript. + +76 +00:04:53,000 --> 00:04:55,000 +That's all we have tanks watching this with you. + diff --git a/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/003 MultiWindow Handling - Handle Popups_en.srt b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/003 MultiWindow Handling - Handle Popups_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..7b1216699a4e32a0082712412584d084580f2c63 --- /dev/null +++ b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/003 MultiWindow Handling - Handle Popups_en.srt @@ -0,0 +1,636 @@ +1 +00:00:00,000 --> 00:00:07,000 +Welcome to the testing world in this session, I'll show you what is multi-window handling and how to + +2 +00:00:07,000 --> 00:00:08,000 +handle multiple pop ups. + +3 +00:00:10,000 --> 00:00:14,000 +So first of all, what is multi-window handling wilding automation? + +4 +00:00:15,000 --> 00:00:21,000 +It might be the situation when you click somewhere and the new tab gets open, or you click somewhere + +5 +00:00:21,000 --> 00:00:26,000 +where a new popup gets open and you want to work on the second tab. + +6 +00:00:26,000 --> 00:00:35,000 +I give an example, like if you're doing mental testing here we have three tabs are open and I want + +7 +00:00:35,000 --> 00:00:36,000 +to work on this particular tab. + +8 +00:00:37,000 --> 00:00:40,000 +So first of all, you will you will have to take your control on this day. + +9 +00:00:40,000 --> 00:00:47,000 +And only after that you can work on this same in the multi-window handling when multiple tabs or multiple + +10 +00:00:47,000 --> 00:00:48,000 +pop ups get open. + +11 +00:00:49,000 --> 00:00:54,000 +I need to switch and control to the different tabs or different popups, and the process is called by + +12 +00:00:54,000 --> 00:00:55,000 +window handling. + +13 +00:00:55,000 --> 00:01:00,000 +Once the switch, the control on a particular table pop up off of that, our task is simple. + +14 +00:01:00,000 --> 00:01:02,000 +We just need to find out the element and perform the task. + +15 +00:01:03,000 --> 00:01:10,000 +But we need to take our control different to the different popup, different tabs, and that is multi + +16 +00:01:11,000 --> 00:01:12,000 +window handling. + +17 +00:01:12,000 --> 00:01:18,000 +So here in this concept, we are going to see how we can switch control to the different tabs, different + +18 +00:01:18,000 --> 00:01:18,000 +pop ups. + +19 +00:01:19,000 --> 00:01:22,000 +Also, we are going to cover JavaScript alerts. + +20 +00:01:22,000 --> 00:01:25,000 +Sometimes we get the JavaScript alert, so I'll show you. + +21 +00:01:25,000 --> 00:01:31,000 +Also, we have a few more concept like frame and a frame, so I'll show you all this concept in coming + +22 +00:01:31,000 --> 00:01:34,000 +few lectures in indecision. + +23 +00:01:34,000 --> 00:01:38,000 +I'm going to call it pop ups if I give an example. + +24 +00:01:38,000 --> 00:01:40,000 +We have a website with the name Rockery dot com. + +25 +00:01:41,000 --> 00:01:48,000 +As we opened Oakley dot com, you will notice along with an dot com, few extra pop ups get open. + +26 +00:01:49,000 --> 00:01:55,000 +So pop up can be open when we click somewhere, but it can also be open if I just open a website or + +27 +00:01:55,000 --> 00:01:56,000 +open a page. + +28 +00:01:56,000 --> 00:02:00,000 +I just want to switch my control to these pop ups and perform the task. + +29 +00:02:01,000 --> 00:02:05,000 +In this case, I just need to switch control and close this pop ups. + +30 +00:02:05,000 --> 00:02:10,000 +But let me show you I'm just coming to my desk. + +31 +00:02:10,000 --> 00:02:11,000 +Yes. + +32 +00:02:12,000 --> 00:02:15,000 +And first of all, I'm just changing the URL to. + +33 +00:02:20,000 --> 00:02:21,000 +No clear outcome. + +34 +00:02:22,000 --> 00:02:24,000 +So North Korea doesn't come. + +35 +00:02:24,000 --> 00:02:25,000 +So that's why you are. + +36 +00:02:27,000 --> 00:02:31,000 +No hint in this example, as this pages open. + +37 +00:02:32,000 --> 00:02:35,000 +Same time, few extra pop ups is also opening. + +38 +00:02:36,000 --> 00:02:38,000 +So here now, total we have three windows. + +39 +00:02:39,000 --> 00:02:47,000 +One is the mean knock nuclear come and two extra pop ups when you open any pop up, any window, any + +40 +00:02:47,000 --> 00:02:50,000 +browser to the. + +41 +00:02:51,000 --> 00:02:55,000 +It give a unique value to each pop up or each browser. + +42 +00:02:56,000 --> 00:02:59,000 +And this unique value is called Windows 10 better. + +43 +00:02:59,000 --> 00:03:03,000 +So first of all, we need to find out this window header. + +44 +00:03:03,000 --> 00:03:05,000 +So I'm just writing like driver. + +45 +00:03:06,000 --> 00:03:06,000 +Not. + +46 +00:03:07,000 --> 00:03:14,000 +Window handles, it is going to bring all the window handler, which is assigned to the different windows + +47 +00:03:14,000 --> 00:03:16,000 +or I'll take different pop and the tabs. + +48 +00:03:17,000 --> 00:03:23,000 +So first of all, whatever the window and it is return, I'm saying like I'm starting all windows. + +49 +00:03:24,000 --> 00:03:29,000 +So this is going to pick all the unique values from the different tabs, pop ups. + +50 +00:03:30,000 --> 00:03:33,000 +I'm going to store it into a list, which is all windows. + +51 +00:03:35,000 --> 00:03:37,000 +Let me show you, I'm just printing like. + +52 +00:03:37,000 --> 00:03:40,000 +All right. + +53 +00:03:40,000 --> 00:03:41,000 +So what? + +54 +00:03:41,000 --> 00:03:45,000 +No other unique value will be assigned to the different windows, the total over here and we are just + +55 +00:03:45,000 --> 00:03:46,000 +printing it. + +56 +00:03:47,000 --> 00:03:48,000 +I'm just running this code. + +57 +00:03:53,000 --> 00:03:57,000 +Browser open and a few extra popups get open. + +58 +00:03:57,000 --> 00:03:59,000 +I'm just coming here to my desk. + +59 +00:04:00,000 --> 00:04:07,000 +And if you notice here we are getting three values that is one second and third because one is the main + +60 +00:04:07,000 --> 00:04:11,000 +window and two extra windows to pop up, get open. + +61 +00:04:11,000 --> 00:04:13,000 +So total tree values are there. + +62 +00:04:13,000 --> 00:04:19,000 +You know, we can switch to the different tabs, different pop ups to this unique value. + +63 +00:04:20,000 --> 00:04:23,000 +So let me show you how we can, which I disclosed this. + +64 +00:04:24,000 --> 00:04:26,000 +I'm just coming here and what I'm saying. + +65 +00:04:29,000 --> 00:04:40,000 +Here I'm just riding like for Lou before all windows in this foot, each window or outer for each value + +66 +00:04:40,000 --> 00:04:41,000 +in this list. + +67 +00:04:42,000 --> 00:04:44,000 +Navigate to each value in this list. + +68 +00:04:44,000 --> 00:04:46,000 +We have already seen for Loop. + +69 +00:04:46,000 --> 00:04:47,000 +So I'm just coming here. + +70 +00:04:48,000 --> 00:04:49,000 +No driver. + +71 +00:04:50,000 --> 00:04:53,000 +Dart switch to dart window. + +72 +00:04:55,000 --> 00:04:56,000 +And the window. + +73 +00:04:57,000 --> 00:04:58,000 +Is right. + +74 +00:04:59,000 --> 00:05:06,000 +So what I'm doing, I'm running a loop of this for this list every time away from this list will come + +75 +00:05:06,000 --> 00:05:14,000 +to this Dublin and now I'm switching my control to the tab or the pop up with a unique value. + +76 +00:05:14,000 --> 00:05:20,000 +Having this so means first time it will pick first value from the from this list and my control will + +77 +00:05:20,000 --> 00:05:21,000 +go to the first window. + +78 +00:05:21,000 --> 00:05:24,000 +No second term second value will come here. + +79 +00:05:24,000 --> 00:05:30,000 +Such contributions to the second window, how do I identify that we are moving to the different windows? + +80 +00:05:30,000 --> 00:05:31,000 +So what I do? + +81 +00:05:32,000 --> 00:05:34,000 +Print Driver Dot. + +82 +00:05:36,000 --> 00:05:37,000 +Correct, you are. + +83 +00:05:37,000 --> 00:05:43,000 +So really what my control is, just take the URL and print it. + +84 +00:05:43,000 --> 00:05:49,000 +So if I get three different URLs means yes, we are switching to the three different windows. + +85 +00:05:50,000 --> 00:05:51,000 +Let me execute this. + +86 +00:05:57,000 --> 00:06:03,000 +The started maximized to do when you are an extra pop up, gets open. + +87 +00:06:04,000 --> 00:06:13,000 +And if I check here, so if you notice here, three of us get over three total window gates open when + +88 +00:06:13,000 --> 00:06:15,000 +his main window and bricks are pop up. + +89 +00:06:16,000 --> 00:06:18,000 +So it is switching to these windows. + +90 +00:06:19,000 --> 00:06:22,000 +Because of that, it pick three different Yordan. + +91 +00:06:23,000 --> 00:06:24,000 +So what we are doing? + +92 +00:06:24,000 --> 00:06:30,000 +First, it will pick first unique value, switch to that window and pick the order of that. + +93 +00:06:30,000 --> 00:06:34,000 +Then second, will you switch to the second window and pick? + +94 +00:06:34,000 --> 00:06:36,000 +You are all in the same with four part of it. + +95 +00:06:38,000 --> 00:06:43,000 +Now, if you can check, we are able to switch to the different windows, but it's a different pop ups. + +96 +00:06:44,000 --> 00:06:45,000 +As of now, we are talking about the pop up. + +97 +00:06:46,000 --> 00:06:49,000 +Later on, I'll talk about the frame. + +98 +00:06:49,000 --> 00:06:51,000 +But as of now, it's pop up. + +99 +00:06:52,000 --> 00:07:01,000 +No, I want to keep my original window and I want to close my pop up because these are the advertisment + +100 +00:07:01,000 --> 00:07:01,000 +pop up. + +101 +00:07:01,000 --> 00:07:04,000 +I don't want to perform any task with it how we can do that. + +102 +00:07:05,000 --> 00:07:06,000 +So I'm just coming here. + +103 +00:07:07,000 --> 00:07:11,000 +First of all, we are picking all the unique value storing into the list. + +104 +00:07:11,000 --> 00:07:18,000 +Now picking a value from this list and moving to each of the window, what each of the window I'm just + +105 +00:07:18,000 --> 00:07:22,000 +checking if driver does not guarantee you. + +106 +00:07:23,000 --> 00:07:26,000 +And I'm comparing this with this. + +107 +00:07:27,000 --> 00:07:28,000 +That's my best window. + +108 +00:07:28,000 --> 00:07:28,000 +You are. + +109 +00:07:29,000 --> 00:07:30,000 +So if it the same. + +110 +00:07:32,000 --> 00:07:34,000 +Just keep it. + +111 +00:07:36,000 --> 00:07:40,000 +Else, if it is different, just. + +112 +00:07:42,000 --> 00:07:42,000 +Throws it. + +113 +00:07:44,000 --> 00:07:47,000 +So here I'm just printing, that's my print. + +114 +00:07:49,000 --> 00:07:53,000 +This is my main window. + +115 +00:07:53,000 --> 00:07:57,000 +And if it is not, then close other windows. + +116 +00:07:58,000 --> 00:08:01,000 +So in this case, I just closed a previous browser. + +117 +00:08:01,000 --> 00:08:08,000 +In this case, it should keep only the base window, which is not critical and remove all other popups + +118 +00:08:08,000 --> 00:08:12,000 +and close all of the pop ups that we execute this time. + +119 +00:08:21,000 --> 00:08:29,000 +So if you notice the UP are getting closed, only original window or the best window is there and we + +120 +00:08:29,000 --> 00:08:30,000 +are having. + +121 +00:08:33,000 --> 00:08:34,000 +No, after closing everything. + +122 +00:08:35,000 --> 00:08:37,000 +What I want to do, I want to print. + +123 +00:08:38,000 --> 00:08:38,000 +You are. + +124 +00:08:38,000 --> 00:08:42,000 +So I'm saying, OK, print current, you are an offer closing everything. + +125 +00:08:42,000 --> 00:08:44,000 +Print guarantee you are here. + +126 +00:08:44,000 --> 00:08:45,000 +They're going to get edit. + +127 +00:08:45,000 --> 00:08:46,000 +I want to show you, Aaron. + +128 +00:08:47,000 --> 00:08:48,000 +I'm just running it. + +129 +00:08:49,000 --> 00:08:50,000 +So what I'm doing? + +130 +00:08:50,000 --> 00:08:55,000 +First of all, I'm moving to the different windows closing pop up and once the paper was closed to the + +131 +00:08:55,000 --> 00:08:56,000 +basement spending. + +132 +00:08:56,000 --> 00:08:57,000 +I want to fetch you all of that. + +133 +00:08:57,000 --> 00:09:00,000 +But here we are going to get error where I'll show you. + +134 +00:09:08,000 --> 00:09:15,000 +It is closed, and now we are getting it away, and it is no such window exception where there's no + +135 +00:09:15,000 --> 00:09:24,000 +window because if you notice first, it goes to the control of the base window and printed this, then + +136 +00:09:24,000 --> 00:09:26,000 +the control to the second window. + +137 +00:09:26,000 --> 00:09:32,000 +The third will not close it, but it has closed her window and the control was switched. + +138 +00:09:32,000 --> 00:09:36,000 +The third window so it shows the window you really want to bring. + +139 +00:09:36,000 --> 00:09:37,000 +You want of it. + +140 +00:09:37,000 --> 00:09:38,000 +No such window exception. + +141 +00:09:38,000 --> 00:09:39,000 +That window doesn't exist. + +142 +00:09:40,000 --> 00:09:46,000 +So after closing these pop ups, I want to take me back to the main window for that. + +143 +00:09:46,000 --> 00:09:49,000 +What I'm doing, I'm taking one variable like main window. + +144 +00:09:50,000 --> 00:09:54,000 +And by default, it does not have anything when it is switching to the main window. + +145 +00:09:55,000 --> 00:10:00,000 +I'm saying this main window is equal to. + +146 +00:10:02,000 --> 00:10:08,000 +When first time when switching to first window, which is a base window, I'm matching this, you are. + +147 +00:10:08,000 --> 00:10:11,000 +And if it does, match means yes, that's my main window. + +148 +00:10:11,000 --> 00:10:14,000 +Well, that's the best window based page. + +149 +00:10:15,000 --> 00:10:20,000 +So whatever their unique value, I'm staring into the main window, main window variable. + +150 +00:10:20,000 --> 00:10:25,000 +Once you close all these windows, then switch back control. + +151 +00:10:27,000 --> 00:10:31,000 +Switch back your control to main window. + +152 +00:10:32,000 --> 00:10:37,000 +So now my control will again come back to the base, your old window and now fetch, there you are. + +153 +00:10:38,000 --> 00:10:43,000 +So at this time, you will notice it will start picking you early because my control will come back + +154 +00:10:43,000 --> 00:10:50,000 +to the base or as the first window, first window, which is my best. + +155 +00:10:50,000 --> 00:10:50,000 +You are a window. + +156 +00:10:56,000 --> 00:10:58,000 +Rather than start it now, if you notice. + +157 +00:11:00,000 --> 00:11:06,000 +Closing it and once closed, yes, it is in the control back and we are getting this, you are. + +158 +00:11:09,000 --> 00:11:14,000 +So here we have seen how we can handle Pop-Up Lady with Python. + +159 +00:11:15,000 --> 00:11:18,000 +That's all we have for the session times watching this video. + diff --git a/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/004 MultiWindow Handling - Handle Tabs_en.srt b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/004 MultiWindow Handling - Handle Tabs_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..1ed080a87aadb83c51cae93901d349a3f1480a3b --- /dev/null +++ b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/004 MultiWindow Handling - Handle Tabs_en.srt @@ -0,0 +1,372 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the artistic world. + +2 +00:00:02,000 --> 00:00:05,000 +So previously we have seen what is multi-window. + +3 +00:00:06,000 --> 00:00:09,000 +And also we have seen how to handle pop ups in this session. + +4 +00:00:09,000 --> 00:00:16,000 +I'll show you how we can handle tap and that is quite similar to the way the handling pop up here. + +5 +00:00:16,000 --> 00:00:23,000 +Also, we are going to fetch unique window handlers for each of the tape, and we are switching to the + +6 +00:00:23,000 --> 00:00:27,000 +different depths by using that handler for that again. + +7 +00:00:27,000 --> 00:00:30,000 +First of all, I would show you a scenario in an application. + +8 +00:00:31,000 --> 00:00:36,000 +So that's my application, and here I just go to the in and perform logging. + +9 +00:00:36,000 --> 00:00:40,000 +So I'm using username and password is also best. + +10 +00:00:41,000 --> 00:00:47,000 +And I have broken my ankle and click on the delete as you click on the Delete a new Typekit open. + +11 +00:00:49,000 --> 00:00:50,000 +So I want to switch to the different tab. + +12 +00:00:51,000 --> 00:00:53,000 +And if you want to perform some tasks, you can do that. + +13 +00:00:53,000 --> 00:00:58,000 +So what I want to do, I want to switch on the start on the step and here on the Delete tab. + +14 +00:00:59,000 --> 00:01:01,000 +I want to click on this start download. + +15 +00:01:02,000 --> 00:01:05,000 +So let me show you how we can do this for that. + +16 +00:01:05,000 --> 00:01:07,000 +First of all, I have prepared a simple script. + +17 +00:01:08,000 --> 00:01:15,000 +Let me show you, we're just going to base your head, then click on the login, enter username and + +18 +00:01:15,000 --> 00:01:15,000 +password. + +19 +00:01:15,000 --> 00:01:16,000 +Click on the sign in button. + +20 +00:01:16,000 --> 00:01:18,000 +My account and delete. + +21 +00:01:18,000 --> 00:01:21,000 +So in that case, I just want to show you a envelope. + +22 +00:01:22,000 --> 00:01:24,000 +Let me execute and show you here. + +23 +00:01:33,000 --> 00:01:36,000 +If you check it here, a new tab gets open. + +24 +00:01:37,000 --> 00:01:44,000 +No, I have multiple tabs which are open by my script, so I won't work on this again for multi-window + +25 +00:01:44,000 --> 00:01:44,000 +handling. + +26 +00:01:45,000 --> 00:01:47,000 +First of all, we have to find out unique window handler. + +27 +00:01:48,000 --> 00:01:49,000 +So I'm saying, okay, all. + +28 +00:01:52,000 --> 00:01:59,000 +Labs that we have seen previously as well is equal to trial work, not window handles. + +29 +00:01:59,000 --> 00:02:02,000 +It's going to pick unique value of all the depths. + +30 +00:02:03,000 --> 00:02:09,000 +No, as we know to what is going to assign a unique value for all the caps or the pop up, which will + +31 +00:02:09,000 --> 00:02:10,000 +be opened by the driver. + +32 +00:02:10,000 --> 00:02:17,000 +So as of now, we're only two steps, so by window handles, it will pick two values and store into + +33 +00:02:17,000 --> 00:02:18,000 +this list. + +34 +00:02:19,000 --> 00:02:21,000 +If you want to print it, you can print it. + +35 +00:02:21,000 --> 00:02:23,000 +So, OK, let me show you for you. + +36 +00:02:24,000 --> 00:02:26,000 +Let me print it as well. + +37 +00:02:26,000 --> 00:02:30,000 +So later on, when we check it will print all the unique values in the console. + +38 +00:02:31,000 --> 00:02:33,000 +No for switching. + +39 +00:02:33,000 --> 00:02:40,000 +I need to really look something again for each step in this list. + +40 +00:02:40,000 --> 00:02:52,000 +All apps just switch the controls for that driver, not switched to start window and system to each + +41 +00:02:52,000 --> 00:02:52,000 +step. + +42 +00:02:52,000 --> 00:02:56,000 +And whichever the tab you have, switch just print. + +43 +00:02:56,000 --> 00:02:58,000 +You had to look at the driver dot. + +44 +00:02:59,000 --> 00:03:03,000 +Driver, not guarantee you are, I'm renting it. + +45 +00:03:03,000 --> 00:03:07,000 +So let me write it into the print statement. + +46 +00:03:07,000 --> 00:03:12,000 +So here what I'm doing is just switching to the different tabs and printing you are looked at. + +47 +00:03:12,000 --> 00:03:14,000 +So here we should get two different errors. + +48 +00:03:15,000 --> 00:03:15,000 +Let me check. + +49 +00:03:17,000 --> 00:03:18,000 +Yes, we have two different theories. + +50 +00:03:18,000 --> 00:03:19,000 +Let me show you. + +51 +00:03:24,000 --> 00:03:25,000 +Just. + +52 +00:03:28,000 --> 00:03:34,000 +Coming here, so now we have two different, you know, I want to perform some tasks on this manage + +53 +00:03:34,000 --> 00:03:35,000 +customer. + +54 +00:03:36,000 --> 00:03:37,000 +So what I'm doing. + +55 +00:03:39,000 --> 00:03:47,000 +If driver talk guarantee you are all equal to some matching with this. + +56 +00:03:51,000 --> 00:03:59,000 +If that's money, what do I need to perform the task on this, I'm just moving here now is there you + +57 +00:03:59,000 --> 00:03:59,000 +are. + +58 +00:03:59,000 --> 00:04:00,000 +Is this? + +59 +00:04:01,000 --> 00:04:03,000 +I need to click on the start download. + +60 +00:04:03,000 --> 00:04:06,000 +So I'll just inspect this element. + +61 +00:04:07,000 --> 00:04:08,000 +It goes to perform tasks. + +62 +00:04:09,000 --> 00:04:09,000 +We have to look at it. + +63 +00:04:10,000 --> 00:04:11,000 +So that's a pattern. + +64 +00:04:12,000 --> 00:04:14,000 +And with that text start download. + +65 +00:04:15,000 --> 00:04:17,000 +OK, so what I'm doing here? + +66 +00:04:19,000 --> 00:04:25,000 +Driver dog find element by X. + +67 +00:04:26,000 --> 00:04:30,000 +And it's important we know how to write X, but I'm not covering that part yet. + +68 +00:04:30,000 --> 00:04:33,000 +I'm just writing it where the text. + +69 +00:04:35,000 --> 00:04:45,000 +Is it clear to this, and I want to click here, so I just want to know no running it. + +70 +00:04:48,000 --> 00:04:49,000 +So here we are, two steps. + +71 +00:04:50,000 --> 00:04:55,000 +I'm switching to that, I'm switching to the second bed, which is open and performing some task on + +72 +00:04:55,000 --> 00:04:55,000 +that. + +73 +00:05:02,000 --> 00:05:04,000 +So if reject the down orders started. + +74 +00:05:06,000 --> 00:05:12,000 +So we have seen how we can how we are going to handle if multiple taps are open. + +75 +00:05:13,000 --> 00:05:19,000 +One thing that we need to understand as of now, I'm on the correct rent or not. + +76 +00:05:20,000 --> 00:05:21,000 +We are using your. + +77 +00:05:22,000 --> 00:05:27,000 +Because in my case, you are a little different for the different depths or different people, but it + +78 +00:05:27,000 --> 00:05:30,000 +might be possible just you are less dynamic. + +79 +00:05:31,000 --> 00:05:31,000 +So we cannot match. + +80 +00:05:31,000 --> 00:05:34,000 +You all know how we can handle that. + +81 +00:05:34,000 --> 00:05:37,000 +In that case, you can validate title. + +82 +00:05:37,000 --> 00:05:39,000 +So if you notice we have the option of. + +83 +00:05:42,000 --> 00:05:50,000 +Data so we can pick that title and match with the expected title if the title is also dynamic in that + +84 +00:05:50,000 --> 00:05:56,000 +case, you can switch to the different URL and you can check a particular element is there or not if + +85 +00:05:56,000 --> 00:05:56,000 +it is there. + +86 +00:05:57,000 --> 00:05:59,000 +Often the task is switched to the next step. + +87 +00:06:00,000 --> 00:06:02,000 +So we are going to use military options. + +88 +00:06:03,000 --> 00:06:09,000 +Either we can validate the URL or title or we can validate any unique element is there or not, if it + +89 +00:06:09,000 --> 00:06:12,000 +is there, but from the dust else, switch to the next step. + +90 +00:06:13,000 --> 00:06:17,000 +If it does not find any, anywhere means it does not open the correct window. + +91 +00:06:19,000 --> 00:06:25,000 +So here we have seen how we can handle multiple steps in selenium, in cleaning with Python. + +92 +00:06:26,000 --> 00:06:27,000 +That's all. + +93 +00:06:27,000 --> 00:06:29,000 +We have tags watching this video. + diff --git a/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/005 MultiWindow Handling - Handle Frame iFrames_en.srt b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/005 MultiWindow Handling - Handle Frame iFrames_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..b25ecd342e2c89ff5cff2fac9a517e5539b464ce --- /dev/null +++ b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/005 MultiWindow Handling - Handle Frame iFrames_en.srt @@ -0,0 +1,452 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:07,000 +So previously, we have seen all we can handle it B&Bs and pop up in multi-window handling. + +3 +00:00:08,000 --> 00:00:15,000 +Now let's switch to how we can handle frames and frames in many website, you will notice there are + +4 +00:00:15,000 --> 00:00:16,000 +a lot of frames and eye frames. + +5 +00:00:17,000 --> 00:00:19,000 +I'll show you how we can work on that. + +6 +00:00:20,000 --> 00:00:27,000 +So first of all, if you want to work on the frame by frame, I'm taking you on a demo website where + +7 +00:00:27,000 --> 00:00:28,000 +you are going to get a frame. + +8 +00:00:29,000 --> 00:00:35,000 +So let me show you that's the application where we have few frames over here. + +9 +00:00:36,000 --> 00:00:41,000 +So first of all, I want to go to this application and I want to click on this button, which is inside + +10 +00:00:41,000 --> 00:00:41,000 +a frame. + +11 +00:00:42,000 --> 00:00:47,000 +So let me show you like, first of all, that's my URL and I'm updating my desk is that we have written + +12 +00:00:47,000 --> 00:00:51,000 +privacy so that my existing code, I just want to change your URL. + +13 +00:00:52,000 --> 00:00:55,000 +So I only use this other starter you are. + +14 +00:00:56,000 --> 00:00:57,000 +So don't what I want to do. + +15 +00:00:58,000 --> 00:01:04,000 +I'm just moving to the browser and I want to click on this button, so I just right click and inspect. + +16 +00:01:05,000 --> 00:01:08,000 +First of all, I'll try to click on this button without switching to the frame. + +17 +00:01:09,000 --> 00:01:11,000 +Then we will notice it will not work. + +18 +00:01:11,000 --> 00:01:12,000 +We have to switch to the frame. + +19 +00:01:13,000 --> 00:01:16,000 +So here, if you notice, that's a means, it's a link with some text. + +20 +00:01:17,000 --> 00:01:29,000 +So what I want to do like write word dark, find element by x path, and it's a type of element where + +21 +00:01:29,000 --> 00:01:31,000 +contains text. + +22 +00:01:32,000 --> 00:01:38,000 +Is equal to this, so I'm just writing an export here, and I assume like you are already comfortable + +23 +00:01:38,000 --> 00:01:39,000 +in the export. + +24 +00:01:39,000 --> 00:01:41,000 +So what we want to do? + +25 +00:01:41,000 --> 00:01:42,000 +I just want to click on this. + +26 +00:01:43,000 --> 00:01:48,000 +As of now, everything is okay, but still, if we execute this, it's not going to work. + +27 +00:01:48,000 --> 00:01:49,000 +It will fail. + +28 +00:01:49,000 --> 00:01:51,000 +Okay, let me show you the execution. + +29 +00:01:52,000 --> 00:01:56,000 +So just executed rather started going to be maximized. + +30 +00:01:57,000 --> 00:01:58,000 +No hair. + +31 +00:01:58,000 --> 00:02:04,000 +Yet, if you notice it is unable to locate that element, so means it is not able to look good because + +32 +00:02:04,000 --> 00:02:09,000 +you wouldn't be using correct look, but still not able to locate because there is a frame and we are + +33 +00:02:09,000 --> 00:02:10,000 +not switching into that. + +34 +00:02:10,000 --> 00:02:18,000 +So let me show you I'm just coming here, and if you take it, there's a link and if you just scroll + +35 +00:02:18,000 --> 00:02:18,000 +up. + +36 +00:02:19,000 --> 00:02:22,000 +So does Link exist in the iframe? + +37 +00:02:23,000 --> 00:02:24,000 +So here you can check that iframe. + +38 +00:02:25,000 --> 00:02:32,000 +So I need to switch to this frame, and only after that we can work on the link for stretching that + +39 +00:02:32,000 --> 00:02:33,000 +we have a command. + +40 +00:02:34,000 --> 00:02:36,000 +So I'm just coming to my desk this. + +41 +00:02:39,000 --> 00:02:40,000 +I'm saying. + +42 +00:02:41,000 --> 00:02:48,000 +First of all, driver dots, which dot, dot frame, which frame you want to switch, so you can use + +43 +00:02:48,000 --> 00:02:51,000 +either idea of the frame or name of the frame. + +44 +00:02:51,000 --> 00:02:56,000 +So first of all, let me show you by the name, I just copy the name and pasted over here. + +45 +00:02:57,000 --> 00:02:59,000 +Now I'm going to execute the same code. + +46 +00:02:59,000 --> 00:03:04,000 +And let me show you how it's going to work executed. + +47 +00:03:05,000 --> 00:03:09,000 +Now, brother started as if not pages loading. + +48 +00:03:10,000 --> 00:03:12,000 +And if you check it has clicked and we got the button. + +49 +00:03:13,000 --> 00:03:13,000 +Read more. + +50 +00:03:14,000 --> 00:03:16,000 +So if you check it, we are not going to get any ETA. + +51 +00:03:16,000 --> 00:03:17,000 +Let me show you. + +52 +00:03:17,000 --> 00:03:21,000 +So we are not having any ETA, so means you are switching to the frame successfully. + +53 +00:03:22,000 --> 00:03:31,000 +In the same way as we switch to the frame by the name, you can use ideas well, so let me show you + +54 +00:03:31,000 --> 00:03:33,000 +the Kodak estimate again. + +55 +00:03:33,000 --> 00:03:38,000 +If you take it here, the idea is I f two, I just copy this. + +56 +00:03:42,000 --> 00:03:51,000 +And so here I want to show you can switch to the free by the name or by the ID, so now I'm trying to + +57 +00:03:51,000 --> 00:03:56,000 +reach by the ID going to execute it rather started. + +58 +00:03:58,000 --> 00:04:00,000 +And if you check it, click on the button. + +59 +00:04:01,000 --> 00:04:07,000 +So here again, we are not going to get any error either we can switch through. + +60 +00:04:09,000 --> 00:04:15,000 +I.D. or name or the third option is that we can fight any element looking at it like I'm trying to search + +61 +00:04:15,000 --> 00:04:22,000 +here that we are finally went by a spot, you can use any look at it because if your jacket frame is + +62 +00:04:22,000 --> 00:04:28,000 +also etched development, so we can look at that frame through any exit through any locator. + +63 +00:04:28,000 --> 00:04:30,000 +So I'm saying, OK, we're. + +64 +00:04:32,000 --> 00:04:39,000 +Let me write this, but so if I check here, I'm going to use name, I frame and the name is I frame + +65 +00:04:39,000 --> 00:04:40,000 +too. + +66 +00:04:40,000 --> 00:04:42,000 +So I'm saying, OK, I frame. + +67 +00:04:43,000 --> 00:04:47,000 +And here name is equal to. + +68 +00:04:49,000 --> 00:04:50,000 +I A-frame, too. + +69 +00:04:50,000 --> 00:04:52,000 +So that is the third approach I'm showing. + +70 +00:04:52,000 --> 00:04:57,000 +First by the name, then I.D. and then we can use any other element locator. + +71 +00:04:57,000 --> 00:05:01,000 +Now I'm going to execute now the browser is open. + +72 +00:05:02,000 --> 00:05:06,000 +As of now, you're not getting any text box so as it could as it click on the button. + +73 +00:05:07,000 --> 00:05:08,000 +Text box will open. + +74 +00:05:09,000 --> 00:05:16,000 +So if you check it, if you check it, it clicked and we are getting this textbook, so everything is + +75 +00:05:16,000 --> 00:05:19,000 +OK, and if you want to check in your code, so that is not failing. + +76 +00:05:20,000 --> 00:05:21,000 +So everything seems to be perfect. + +77 +00:05:21,000 --> 00:05:25,000 +As of now, we are able to switch to the frame and perform the task. + +78 +00:05:25,000 --> 00:05:28,000 +In that note, the next task I want to perform. + +79 +00:05:30,000 --> 00:05:36,000 +After speaking on this frame, I I'm doing some task after working on the frame. + +80 +00:05:36,000 --> 00:05:38,000 +I want to perform something on the main window. + +81 +00:05:38,000 --> 00:05:39,000 +I want to click on this video. + +82 +00:05:40,000 --> 00:05:41,000 +So how we can do that? + +83 +00:05:41,000 --> 00:05:48,000 +So I just right click on this, right click on this, and I'm trying to find out a symbol of that. + +84 +00:05:49,000 --> 00:05:55,000 +So you will notice because my control is on the frame as of now, but now I want to perform tasks outside + +85 +00:05:55,000 --> 00:05:56,000 +the frame. + +86 +00:05:56,000 --> 00:06:01,000 +So how we can work on it, if you check it, that's S-Pen with the next videos. + +87 +00:06:01,000 --> 00:06:04,000 +Okay, come here. + +88 +00:06:04,000 --> 00:06:08,000 +And what I want to do prior work dot find element by Exparte. + +89 +00:06:10,000 --> 00:06:13,000 +Span, where? + +90 +00:06:14,000 --> 00:06:14,000 +Text. + +91 +00:06:16,000 --> 00:06:18,000 +Is equal to reduce. + +92 +00:06:18,000 --> 00:06:20,000 +And I want to click on this. + +93 +00:06:20,000 --> 00:06:25,000 +You will notice it's going to be filled because my control is in the frame now. + +94 +00:06:25,000 --> 00:06:30,000 +And now I want to know I want to perform tasks outside of him, so it will feel. + +95 +00:06:31,000 --> 00:06:36,000 +Let me show you and then I'll show you how we can control the situation, how we can handle the situation + +96 +00:06:37,000 --> 00:06:39,000 +rather started maximized. + +97 +00:06:40,000 --> 00:06:43,000 +It's going to perform a task in the frame, so let it perform. + +98 +00:06:44,000 --> 00:06:45,000 +So here it. + +99 +00:06:45,000 --> 00:06:48,000 +Click on that and we go to the more button and we go to textbooks. + +100 +00:06:48,000 --> 00:06:54,000 +But now let me show you it's going to be filled because here my control is in the frame and it is not + +101 +00:06:54,000 --> 00:06:55,000 +able to find out that locator. + +102 +00:06:56,000 --> 00:07:02,000 +So, no, I have worked on the frame and I want to take my control back to the normal window or back + +103 +00:07:02,000 --> 00:07:03,000 +to the painted window. + +104 +00:07:03,000 --> 00:07:10,000 +For that, we need the right driver not switch to dot default content. + +105 +00:07:10,000 --> 00:07:15,000 +So this is going to take my control akin back to the parent window from the frame. + +106 +00:07:15,000 --> 00:07:18,000 +So I'm just going to execute it one more time. + +107 +00:07:18,000 --> 00:07:24,000 +And this time you will notice your control back to the default content means to the parent window. + +108 +00:07:25,000 --> 00:07:29,000 +Parent page and now you're able to click on the videos. + +109 +00:07:30,000 --> 00:07:31,000 +Click on Button. + +110 +00:07:34,000 --> 00:07:39,000 +And now, if you check it here at the top, it is able to click on the videos as well. + +111 +00:07:40,000 --> 00:07:46,000 +So here in this session, we have seen how we can handle frame and how we can switch back to the parent + +112 +00:07:46,000 --> 00:07:46,000 +window. + +113 +00:07:48,000 --> 00:07:51,000 +So that's all we have for the session tanks watching this video. + diff --git a/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/006 Generate Logs Files_en.srt b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/006 Generate Logs Files_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..3f25b5fafbc7e31cdda796854811c274278195e8 --- /dev/null +++ b/37 - Advance Selenium Concepts (Logs, Snapshot, Multi Window Handling)/006 Generate Logs Files_en.srt @@ -0,0 +1,472 @@ +1 +00:00:00,000 --> 00:00:07,000 +Welcome to the testing world in this session, I'll show you how we can generate locks in selenium with + +2 +00:00:07,000 --> 00:00:08,000 +Python. + +3 +00:00:08,000 --> 00:00:11,000 +So first of all, we need to understand what do you mean by locks? + +4 +00:00:12,000 --> 00:00:17,000 +So hopefully you have seen developers are generating locks in application. + +5 +00:00:18,000 --> 00:00:26,000 +Why degenerate locks locks are justified in which every event is placed means whatever the task you + +6 +00:00:26,000 --> 00:00:31,000 +are doing on the application or whatever, the error we are getting in, the application will be stored. + +7 +00:00:31,000 --> 00:00:33,000 +What else is saved in the lock files? + +8 +00:00:33,000 --> 00:00:39,000 +So whenever required, you can go open the lock when and check it in the same way. + +9 +00:00:40,000 --> 00:00:44,000 +We can also generate lock in our automation for generating lock. + +10 +00:00:44,000 --> 00:00:49,000 +We are going to use a module with the name logging module and test, and it's a standard module which + +11 +00:00:49,000 --> 00:00:51,000 +is by default coming with Python. + +12 +00:00:52,000 --> 00:00:56,000 +Now by this, we can track all the events in our log files. + +13 +00:00:56,000 --> 00:00:57,000 +We can view it. + +14 +00:00:58,000 --> 00:01:02,000 +We can save it for the later video link to generate logs. + +15 +00:01:02,000 --> 00:01:09,000 +We have few functions like debug warning and info and political, but these are the functions which + +16 +00:01:09,000 --> 00:01:12,000 +we are going to use to put data into the log files. + +17 +00:01:12,000 --> 00:01:18,000 +So different functions are for the different tasks like if you say I'm inserting a warning in the log + +18 +00:01:18,000 --> 00:01:25,000 +file so you can use warning function in the same way you want to enter and in the log file so you can + +19 +00:01:25,000 --> 00:01:26,000 +just log in that error. + +20 +00:01:27,000 --> 00:01:28,000 +I'll show you how we can use it. + +21 +00:01:29,000 --> 00:01:32,000 +Then I'm coming to log logging levels. + +22 +00:01:32,000 --> 00:01:37,000 +We have the different levels in the logging like we have to set level, like what kind of logs you want + +23 +00:01:37,000 --> 00:01:39,000 +to generate and particular log. + +24 +00:01:40,000 --> 00:01:45,000 +So if I set the level info so it will start info, warning error and get it critical. + +25 +00:01:46,000 --> 00:01:50,000 +So if it's a warning, so warning error and critical means we can set the level. + +26 +00:01:50,000 --> 00:01:54,000 +And as we set the level, all the levels below two, it will be started. + +27 +00:01:56,000 --> 00:01:56,000 +No. + +28 +00:01:57,000 --> 00:02:00,000 +We have some steps that we need to follow Horton logs. + +29 +00:02:01,000 --> 00:02:03,000 +So in previous session, I have created a test case. + +30 +00:02:03,000 --> 00:02:04,000 +I'm going to the same. + +31 +00:02:07,000 --> 00:02:13,000 +And here I'm just taking some of my own application, which is WW W. + +32 +00:02:17,000 --> 00:02:17,000 +The. + +33 +00:02:20,000 --> 00:02:24,000 +Just doing word dot com forward slash listings. + +34 +00:02:24,000 --> 00:02:30,000 +So it's a simple task that everyone is just maximizing browser and putting a, you know, whenever you + +35 +00:02:30,000 --> 00:02:31,000 +want to start. + +36 +00:02:31,000 --> 00:02:37,000 +Look, first of all, we have to import a logging library and which is a standard library, so we need + +37 +00:02:37,000 --> 00:02:37,000 +to install it. + +38 +00:02:38,000 --> 00:02:40,000 +So I'm just coming here, import. + +39 +00:02:42,000 --> 00:02:42,000 +Looking. + +40 +00:02:44,000 --> 00:02:47,000 +Next, so that is a step one next. + +41 +00:02:48,000 --> 00:02:54,000 +We have to see it lawyer object for that, we have to call him at that logging, but get longer. + +42 +00:02:54,000 --> 00:02:57,000 +So I'm saying like, OK, log is equal to. + +43 +00:02:59,000 --> 00:03:00,000 +Logging. + +44 +00:03:02,000 --> 00:03:05,000 +Dot get longer. + +45 +00:03:06,000 --> 00:03:09,000 +And we have to pass like this, Jim. + +46 +00:03:09,000 --> 00:03:11,000 +Name, which is a default function. + +47 +00:03:12,000 --> 00:03:12,000 +OK. + +48 +00:03:13,000 --> 00:03:13,000 +No. + +49 +00:03:14,000 --> 00:03:19,000 +So that's the steps, second, in steps that can we also need to set level of the law. + +50 +00:03:20,000 --> 00:03:26,000 +We have seen we have the different levels like if you take it, hit debug info, a warning and a critical. + +51 +00:03:26,000 --> 00:03:27,000 +So what kind of level you want to set? + +52 +00:03:28,000 --> 00:03:35,000 +So I'm saying look at log dot set level and my level is logging. + +53 +00:03:37,000 --> 00:03:40,000 +Dot debunks, I'm saying. + +54 +00:03:40,000 --> 00:03:41,000 +I think deeper global. + +55 +00:03:41,000 --> 00:03:43,000 +So you can set any level over here. + +56 +00:03:43,000 --> 00:03:49,000 +So now step two is done and if I check like, that's my step one to import it. + +57 +00:03:49,000 --> 00:03:54,000 +And that's my step to where we are cutting the logging object and we are setting the level. + +58 +00:03:55,000 --> 00:03:56,000 +So that's my step. + +59 +00:03:57,000 --> 00:04:00,000 +To know I'm coming to the third step. + +60 +00:04:02,000 --> 00:04:09,000 +Here we need to create while Handler, so whatever the locks you are going to generate, we are going + +61 +00:04:09,000 --> 00:04:09,000 +to store into the file. + +62 +00:04:10,000 --> 00:04:15,000 +So we need to define what all the fights you want to use for writing logs. + +63 +00:04:15,000 --> 00:04:19,000 +As of now, I will show you two files. + +64 +00:04:19,000 --> 00:04:22,000 +I agree to fight one word of warning and one for the info. + +65 +00:04:23,000 --> 00:04:28,000 +So I'm saying because if I start to debug logs, so all the log will be started. + +66 +00:04:28,000 --> 00:04:31,000 +So I want my warning log will be placed in one file. + +67 +00:04:31,000 --> 00:04:35,000 +My in-flow will replace the second file, so you can define that. + +68 +00:04:35,000 --> 00:04:40,000 +For that, I'm using, I'm saying that's my step. + +69 +00:04:41,000 --> 00:04:42,000 +Three. + +70 +00:04:42,000 --> 00:04:45,000 +And first of all, I want to create a warning logs. + +71 +00:04:45,000 --> 00:04:53,000 +So I'm saying logging dot file handler and then your file is placed, I'm saying. + +72 +00:04:54,000 --> 00:04:58,000 +It will place in the current project with the name warning. + +73 +00:05:00,000 --> 00:05:09,000 +Looks to be that's an extension, so that's my warning logs for this file, I want to set levels. + +74 +00:05:09,000 --> 00:05:10,000 +I'll see. + +75 +00:05:11,000 --> 00:05:20,000 +Set level, which is logging dot warning against conduct, warning in the same way I want to get in + +76 +00:05:20,000 --> 00:05:31,000 +for, I say, in for logging dot file handler and in follow, I want to create in a file like in full + +77 +00:05:32,000 --> 00:05:41,000 +logs, dot the SD and info dot sic level and logging. + +78 +00:05:43,000 --> 00:05:45,000 +Dot info. + +79 +00:05:46,000 --> 00:05:52,000 +So now I have set the fires in step three, we set the fires in which we want to place laws. + +80 +00:05:52,000 --> 00:05:53,000 +So first of all, we import. + +81 +00:05:54,000 --> 00:05:56,000 +Then we are setting what all the logs we want to generate. + +82 +00:05:57,000 --> 00:06:01,000 +So we are setting our logger log on to tell like what all the logs we want to generate. + +83 +00:06:01,000 --> 00:06:07,000 +Then we have a handler which is handling the file very well to generate logs next and very important. + +84 +00:06:08,000 --> 00:06:10,000 +Next, we need to define the formatting of the logs. + +85 +00:06:11,000 --> 00:06:16,000 +So if you notice, in many cases, the formatting would be like, first of all, we are getting date + +86 +00:06:16,000 --> 00:06:17,000 +and time. + +87 +00:06:18,000 --> 00:06:19,000 +So that kind of formatting you want to generate. + +88 +00:06:20,000 --> 00:06:21,000 +So not step. + +89 +00:06:21,000 --> 00:06:25,000 +Next step would be we are setting the format of log files. + +90 +00:06:26,000 --> 00:06:29,000 +So next step is we need to set the format. + +91 +00:06:30,000 --> 00:06:31,000 +This format we need to remember. + +92 +00:06:32,000 --> 00:06:34,000 +We just need to copy these lines. + +93 +00:06:34,000 --> 00:06:39,000 +So you I share this document with you and you can just copy this line. + +94 +00:06:39,000 --> 00:06:44,000 +We are setting like, first of all, name, first of all the time, the name and log level the message + +95 +00:06:44,000 --> 00:06:48,000 +so we can write it, if you remember, but that's not mandatory. + +96 +00:06:49,000 --> 00:06:50,000 +So that is a step four. + +97 +00:06:51,000 --> 00:06:58,000 +No, this is a separate format that as of now, we need to integrate this format with a file handler + +98 +00:06:58,000 --> 00:07:01,000 +because ultimately this format will be applied on this file. + +99 +00:07:01,000 --> 00:07:03,000 +So no next step would be. + +100 +00:07:04,000 --> 00:07:16,000 +Just step five and I'm seeing war dart set for amateur and my Formentor is this. + +101 +00:07:16,000 --> 00:07:20,000 +So on warning logs, I'm starting this one in the same way. + +102 +00:07:20,000 --> 00:07:23,000 +I'm seeing inflows. + +103 +00:07:23,000 --> 00:07:27,000 +So in 4.6 formatter and the former tourists. + +104 +00:07:28,000 --> 00:07:32,000 +So these are the steps we need to follow for generating the logs. + +105 +00:07:32,000 --> 00:07:41,000 +No, whenever you want to generate logs, like if I want a right up here, I'll just cut these lines + +106 +00:07:42,000 --> 00:07:48,000 +and I'm putting here now on this point, my utility bill and I want to enter this information into the + +107 +00:07:48,000 --> 00:07:50,000 +logs for generating logs. + +108 +00:07:50,000 --> 00:07:55,000 +It's locked dot info and what information you want to enter. + +109 +00:07:55,000 --> 00:08:04,000 +So I'm saying, OK, my urine is open so you can put any information in the same way. + +110 +00:08:04,000 --> 00:08:05,000 +I want to enter a warning as well. + +111 +00:08:05,000 --> 00:08:18,000 +So I'm taking warning and there is a delay in opening of browser. + +112 +00:08:19,000 --> 00:08:22,000 +So as of now, I'm just just putting these two lines in the logs. + +113 +00:08:23,000 --> 00:08:24,000 +I'm going to execute. + +114 +00:08:27,000 --> 00:08:28,000 +So that is done. + +115 +00:08:29,000 --> 00:08:35,000 +And now these files are generated at the logs in this log files these fighters rated and you're getting + +116 +00:08:35,000 --> 00:08:37,000 +this warning under control as well. + +117 +00:08:39,000 --> 00:08:45,000 +So he indecision we have seen how we can generate locks in Sydney with Python. + +118 +00:08:46,000 --> 00:08:49,000 +That's all we have for the session tanks watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/001 Create Project Structure_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/001 Create Project Structure_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..53d790622e82909ad74728f1ae473e28a4447fe2 --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/001 Create Project Structure_en.srt @@ -0,0 +1,296 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the wrestling world. + +2 +00:00:02,000 --> 00:00:08,000 +So previously, we have seen how to create disguises insulating with Python and how we can use bite + +3 +00:00:09,000 --> 00:00:09,000 +test. + +4 +00:00:10,000 --> 00:00:18,000 +But previously, if you notice we are creating test cases in a single file, so previously you have + +5 +00:00:18,000 --> 00:00:20,000 +seen like each file behave as a disguise. + +6 +00:00:21,000 --> 00:00:22,000 +Here's Mike Discuses. + +7 +00:00:23,000 --> 00:00:29,000 +But now, if you notice we have a lot of duplicate code here as well. + +8 +00:00:29,000 --> 00:00:34,000 +If you check here, browsers start and you are maximize close. + +9 +00:00:34,000 --> 00:00:37,000 +That's a duplicate code in the same way. + +10 +00:00:38,000 --> 00:00:43,000 +Lot of steps which we are using in our test case are going to be duplicate as well. + +11 +00:00:43,000 --> 00:00:46,000 +So now we need to generate a project structure. + +12 +00:00:46,000 --> 00:00:52,000 +And later on, we will convert it into the framework format where there is not a preview of the code. + +13 +00:00:53,000 --> 00:00:58,000 +Also, maintenance would be easy means if you want to change something, you will have to make changes + +14 +00:00:58,000 --> 00:00:59,000 +on a one place only. + +15 +00:01:00,000 --> 00:01:02,000 +So now I'll generate a project structure. + +16 +00:01:03,000 --> 00:01:05,000 +By that, we are going to move forward. + +17 +00:01:05,000 --> 00:01:13,000 +So normally when we are going for project structure, we have some folders over there when we are going + +18 +00:01:13,000 --> 00:01:14,000 +to help desk folders. + +19 +00:01:15,000 --> 00:01:17,000 +Here we are going to place all the discuses. + +20 +00:01:17,000 --> 00:01:24,000 +We have some base files basically having the code, which is required for each of the tasks, like for + +21 +00:01:24,000 --> 00:01:27,000 +each of the places I want to start browser, maximize it. + +22 +00:01:27,000 --> 00:01:30,000 +So that kind of core outpaced the base files. + +23 +00:01:31,000 --> 00:01:32,000 +Then we will have library files. + +24 +00:01:33,000 --> 00:01:39,000 +Library files means whatever the code that you think that is common to the multiple tasks is like if + +25 +00:01:39,000 --> 00:01:40,000 +you want to read element locator. + +26 +00:01:42,000 --> 00:01:44,000 +So we will place the cordon to the library file. + +27 +00:01:44,000 --> 00:01:49,000 +You want to generate logs, you want to take screenshots so that kind of go to the library file. + +28 +00:01:50,000 --> 00:01:51,000 +Then we have configuration data. + +29 +00:01:51,000 --> 00:01:56,000 +Configuration data means the data, which you think could be changed while execution of the disk. + +30 +00:01:57,000 --> 00:02:00,000 +We are maintaining a separate file and using it from there. + +31 +00:02:00,000 --> 00:02:03,000 +So whenever required, we can change on one page. + +32 +00:02:03,000 --> 00:02:06,000 +We just got information file pages. + +33 +00:02:06,000 --> 00:02:11,000 +So if you heard about the concept of be homepage object model, we are going to implement that. + +34 +00:02:11,000 --> 00:02:16,000 +We are going to place these pages here in the Pages folder and then we have other options with the help + +35 +00:02:16,000 --> 00:02:20,000 +of which we can compare actual results with expected result. + +36 +00:02:20,000 --> 00:02:22,000 +So there's a project structure we're going to generate. + +37 +00:02:23,000 --> 00:02:26,000 +I'm coming here, I'm going to create a new project. + +38 +00:02:27,000 --> 00:02:31,000 +So new project, I'm saying you can give any name. + +39 +00:02:31,000 --> 00:02:38,000 +I'm saying end to end automation, opening a new window. + +40 +00:02:41,000 --> 00:02:46,000 +So now I'm going to generate the produce structure, and then we are going to start writing the code + +41 +00:02:46,000 --> 00:02:49,000 +and that produced this generated. + +42 +00:02:50,000 --> 00:02:52,000 +Now we can go for different directory. + +43 +00:02:52,000 --> 00:02:55,000 +That's my project and we can go to the different directory. + +44 +00:02:55,000 --> 00:02:56,000 +I'm coming here. + +45 +00:02:59,000 --> 00:03:06,000 +New and I want to create a directory with the name test cases so we can understand in this directory, + +46 +00:03:06,000 --> 00:03:10,000 +we are going to have all the discuses in the same way. + +47 +00:03:11,000 --> 00:03:14,000 +I'm going to create a directory with the name base files. + +48 +00:03:14,000 --> 00:03:17,000 +So here we are, going to get all the base files. + +49 +00:03:18,000 --> 00:03:20,000 +Means the code, which is required for each of the disks. + +50 +00:03:21,000 --> 00:03:24,000 +Then I'm going for library. + +51 +00:03:25,000 --> 00:03:32,000 +So that is a code which will be used in the different discuses like taking screenshot clearing logs. + +52 +00:03:32,000 --> 00:03:34,000 +So that kind of coral paste to the library. + +53 +00:03:36,000 --> 00:03:39,000 +Then we have a directory with the name pages. + +54 +00:03:40,000 --> 00:03:46,000 +So here I'm going to implement BOM structure, which is page object model going to Beth in the poem. + +55 +00:03:47,000 --> 00:03:48,000 +Then we have. + +56 +00:03:50,000 --> 00:03:58,000 +Configurations file so configuration files that I'm going to place over here and then we are going to + +57 +00:03:58,000 --> 00:04:00,000 +have assertions. + +58 +00:04:02,000 --> 00:04:04,000 +One thing I want to explain here. + +59 +00:04:05,000 --> 00:04:07,000 +I have created a basic structure here. + +60 +00:04:07,000 --> 00:04:12,000 +If you think you have more files or different type of files which you want to divide, you can create + +61 +00:04:12,000 --> 00:04:15,000 +more folders like one thing I'm going to do. + +62 +00:04:16,000 --> 00:04:23,000 +As of now, if you see the previous discuses, this part we are giving directly, but that is not a + +63 +00:04:23,000 --> 00:04:24,000 +correct approach. + +64 +00:04:24,000 --> 00:04:24,000 +Why? + +65 +00:04:25,000 --> 00:04:27,000 +Because this part could change. + +66 +00:04:27,000 --> 00:04:31,000 +If I share my project with you in your system, the spot would be different. + +67 +00:04:32,000 --> 00:04:34,000 +So normally we're not giving that kind of path. + +68 +00:04:34,000 --> 00:04:41,000 +We are taking the part which is independent, independent of the system, so we can also place our driver + +69 +00:04:41,000 --> 00:04:49,000 +files into separate folders with the name driver so we can create the structure as per requirement. + +70 +00:04:50,000 --> 00:04:52,000 +As of now, I just read the basic structure. + +71 +00:04:53,000 --> 00:05:00,000 +So here I have created a basic structure, basic project structure in next session onwards. + +72 +00:05:00,000 --> 00:05:03,000 +I'll start writing code into the different folders. + +73 +00:05:05,000 --> 00:05:06,000 +That's all we have for the session. + +74 +00:05:07,000 --> 00:05:08,000 +Thanks watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/002 Create Base Files Save Common data to be used in all testcases_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/002 Create Base Files Save Common data to be used in all testcases_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..340ceff23abf3d59356e2e56cb92c1f31721127a --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/002 Create Base Files Save Common data to be used in all testcases_en.srt @@ -0,0 +1,832 @@ +1 +00:00:01,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +So previously, we have seen we have created a project structure and now we are going to write our code + +3 +00:00:09,000 --> 00:00:11,000 +and into into different folders. + +4 +00:00:12,000 --> 00:00:18,000 +So we are going to segregate our code, which is going to remove duplication, and it will be easy for + +5 +00:00:18,000 --> 00:00:19,000 +us to maintain the code. + +6 +00:00:20,000 --> 00:00:26,000 +OK, so first of all, I'm just moving to the project and here I'm going to create a test case that + +7 +00:00:26,000 --> 00:00:29,000 +we've written previously, like we are going to write everything in a single file. + +8 +00:00:30,000 --> 00:00:31,000 +So I'm moving to the test kit level. + +9 +00:00:32,000 --> 00:00:36,000 +This is folder and I'm creating a file python file here. + +10 +00:00:37,000 --> 00:00:43,000 +Test underscore we know that in by test, the file name should be started with the Test. + +11 +00:00:44,000 --> 00:00:54,000 +DC underscored 001 and I'm saying like registration valid data so we can give any name. + +12 +00:00:54,000 --> 00:00:56,000 +I'm just giving the meaningful name. + +13 +00:00:56,000 --> 00:00:59,000 +Here we can easily understand what this task gives is doing. + +14 +00:01:00,000 --> 00:01:03,000 +We know that outright this case, I'm writing in a single file. + +15 +00:01:03,000 --> 00:01:14,000 +First of all, we need to import so from selenium dot that driver import chrome. + +16 +00:01:16,000 --> 00:01:20,000 +Known for writing the test case, we need to create a method of death. + +17 +00:01:21,000 --> 00:01:23,000 +Best underscore method name. + +18 +00:01:23,000 --> 00:01:31,000 +Should we start with the test because we are going to use bits and validate registration? + +19 +00:01:32,000 --> 00:01:33,000 +That's my method name. + +20 +00:01:34,000 --> 00:01:35,000 +Now what? + +21 +00:01:35,000 --> 00:01:36,000 +The method is going to be started. + +22 +00:01:37,000 --> 00:01:44,000 +So first of all, whenever we want to work on selenium, we need to create a driver object. + +23 +00:01:44,000 --> 00:01:46,000 +So here we have a chrome driver. + +24 +00:01:46,000 --> 00:01:51,000 +Something like driver is equal to chrome. + +25 +00:01:51,000 --> 00:01:53,000 +We are getting chrome driver object. + +26 +00:01:54,000 --> 00:02:02,000 +No, the point is we need to set, but for the easy file, so part is equal to and we need to give the + +27 +00:02:02,000 --> 00:02:03,000 +executable file. + +28 +00:02:03,000 --> 00:02:09,000 +So here in my system, the file is placed in this directory. + +29 +00:02:09,000 --> 00:02:12,000 +So I just copied this and giving this part. + +30 +00:02:13,000 --> 00:02:18,000 +Also, the file name chrome driver not easy. + +31 +00:02:18,000 --> 00:02:20,000 +So that is a code which we have written previously. + +32 +00:02:20,000 --> 00:02:27,000 +I'm just writing the same code and then I'm going to distribute into different directories. + +33 +00:02:27,000 --> 00:02:32,000 +And we know that while giving the part on the place of single backwards slash, we need to use double + +34 +00:02:32,000 --> 00:02:34,000 +backward slash here. + +35 +00:02:34,000 --> 00:02:37,000 +We need to mention executable part is equal to. + +36 +00:02:37,000 --> 00:02:41,000 +But so this good will start browser. + +37 +00:02:41,000 --> 00:02:51,000 +Now we want to enter the URL something driver does not get and what you really want to enter. + +38 +00:02:51,000 --> 00:03:03,000 +So I want to enter a CTP w w w the testing word dot com forward less testing, then I hope you remember + +39 +00:03:03,000 --> 00:03:04,000 +the application. + +40 +00:03:05,000 --> 00:03:06,000 +That's the application which I'm opening. + +41 +00:03:07,000 --> 00:03:10,000 +I want to work on the different elements, so I want to enter username here. + +42 +00:03:10,000 --> 00:03:19,000 +So just right click on this inspect and we have the option like we can look at it by the name locators. + +43 +00:03:19,000 --> 00:03:20,000 +I just copied it. + +44 +00:03:21,000 --> 00:03:27,000 +Driver Dot find element by name. + +45 +00:03:27,000 --> 00:03:28,000 +That's the name. + +46 +00:03:31,000 --> 00:03:33,000 +And send guys. + +47 +00:03:33,000 --> 00:03:34,000 +So I'm putting. + +48 +00:03:34,000 --> 00:03:35,000 +Hello. + +49 +00:03:35,000 --> 00:03:39,000 +And after the execution, I just want to close Brothers Driver got close. + +50 +00:03:39,000 --> 00:03:42,000 +So that is a test case, which we have written previously. + +51 +00:03:42,000 --> 00:03:44,000 +As of now, I'm working on one element. + +52 +00:03:44,000 --> 00:03:47,000 +Only later on, I work on different elements. + +53 +00:03:48,000 --> 00:03:50,000 +As of now, only one best case is created. + +54 +00:03:50,000 --> 00:03:56,000 +But but where we are creating multiple test cases, you will notice this code, which is starting browser + +55 +00:03:57,000 --> 00:03:59,000 +enter the URL or maybe maximize window. + +56 +00:03:59,000 --> 00:04:03,000 +The kind of code will be the part of each and every. + +57 +00:04:04,000 --> 00:04:06,000 +So they're the that writing on the desk level. + +58 +00:04:06,000 --> 00:04:10,000 +We should write it separately and wherever required, just use it. + +59 +00:04:11,000 --> 00:04:17,000 +So first thing that I'm going to do, I'm going to place this code on a separate place. + +60 +00:04:17,000 --> 00:04:23,000 +So hope you remember we have created a best folder and that is a bit of each and every desk. + +61 +00:04:24,000 --> 00:04:25,000 +So I'm just going there. + +62 +00:04:25,000 --> 00:04:31,000 +New, I'm creating a Python file and the Python file name I'm giving. + +63 +00:04:33,000 --> 00:04:40,000 +I'm seeing initiate drywall now. + +64 +00:04:40,000 --> 00:04:48,000 +The code that you want to execute before your test case, I'll just cut it down and creating a method + +65 +00:04:48,000 --> 00:04:49,000 +here. + +66 +00:04:49,000 --> 00:04:57,000 +So first of all, we need to import like from selenium dot web driver import chrome. + +67 +00:04:58,000 --> 00:05:02,000 +Now I'm creating a method like Def Start browser. + +68 +00:05:05,000 --> 00:05:14,000 +And here I'm writing the score and whatever the driver or object that is created here, I want to return + +69 +00:05:14,000 --> 00:05:17,000 +it because we need to use it on a multiple basis. + +70 +00:05:17,000 --> 00:05:19,000 +I'm saying a return driver. + +71 +00:05:20,000 --> 00:05:21,000 +So that's the object I'm returning to. + +72 +00:05:22,000 --> 00:05:28,000 +In the same way, like Death Clause browser. + +73 +00:05:31,000 --> 00:05:35,000 +And here I want right, driver dock gauze. + +74 +00:05:36,000 --> 00:05:42,000 +No, the point is this driver object is created in stark bubbles of myth that is a local to the method + +75 +00:05:42,000 --> 00:05:44,000 +how we can use it in the different methods. + +76 +00:05:44,000 --> 00:05:53,000 +So hope you remember we can declare it as a global, so global driver means that driver object I'm going + +77 +00:05:53,000 --> 00:05:54,000 +to create over here. + +78 +00:05:55,000 --> 00:05:55,000 +That's global. + +79 +00:05:55,000 --> 00:05:58,000 +Global means can be used anywhere in this way. + +80 +00:05:59,000 --> 00:06:06,000 +So now we return to Method one, a starting browser, maximize and just return driver object, and either + +81 +00:06:06,000 --> 00:06:08,000 +one is disclosing the puzzle. + +82 +00:06:09,000 --> 00:06:11,000 +Now I'm coming to the test case. + +83 +00:06:12,000 --> 00:06:18,000 +And first of all, if you want to use that method, then we need to import. + +84 +00:06:20,000 --> 00:06:23,000 +But the most important part or understand how we can import that. + +85 +00:06:25,000 --> 00:06:33,000 +Now the next thing which we need to understand very carefully whenever you are importing, just giving + +86 +00:06:33,000 --> 00:06:40,000 +that emphasis from the project level, like inside the project, we have base inside the base. + +87 +00:06:40,000 --> 00:06:49,000 +We have a major driver, so we just need to get their friends from the project level from, I'm saying, + +88 +00:06:49,000 --> 00:06:54,000 +based import initiate driver. + +89 +00:06:56,000 --> 00:07:04,000 +And now we can use initial driver as a package, initial driver dart and we have start browser. + +90 +00:07:04,000 --> 00:07:06,000 +So that is going to return a driver object. + +91 +00:07:06,000 --> 00:07:11,000 +I'm saying that's my driver and driver will be used here. + +92 +00:07:13,000 --> 00:07:14,000 +As of now. + +93 +00:07:14,000 --> 00:07:16,000 +That's perfect, but it's going to be failed. + +94 +00:07:16,000 --> 00:07:17,000 +I'll show you why it's getting filled. + +95 +00:07:18,000 --> 00:07:21,000 +First of all, now when you generated the project structure. + +96 +00:07:21,000 --> 00:07:24,000 +So we need to execute it from the project level. + +97 +00:07:24,000 --> 00:07:29,000 +So first of all, I'm just taking the path of the project and open terminal. + +98 +00:07:29,000 --> 00:07:30,000 +I'm saying, OK, go to terminal. + +99 +00:07:32,000 --> 00:07:34,000 +And now what? + +100 +00:07:34,000 --> 00:07:39,000 +Executing we need to mention by test what we want to execute on the project level. + +101 +00:07:39,000 --> 00:07:45,000 +I'm just riding like bite dust, and I'm just giving the folder name like test cases because my order + +102 +00:07:45,000 --> 00:07:46,000 +skills exist in this world. + +103 +00:07:47,000 --> 00:07:51,000 +I'm executing and it should not execute a tutorial here. + +104 +00:07:54,000 --> 00:08:01,000 +Just because it shows it is not able to understand what is best, you are writing best import initial + +105 +00:08:01,000 --> 00:08:08,000 +driver, but it is not able to understand that because base itself is not a package, it just affordable. + +106 +00:08:09,000 --> 00:08:10,000 +No. + +107 +00:08:11,000 --> 00:08:13,000 +Most important part is going to be stocked from here. + +108 +00:08:15,000 --> 00:08:20,000 +This is the folder, and this folder has many flyers inside it. + +109 +00:08:21,000 --> 00:08:30,000 +If you want to treat this folder as a package, go to that folder new and create a Python file. + +110 +00:08:31,000 --> 00:08:34,000 +Just give the name like in it. + +111 +00:08:35,000 --> 00:08:42,000 +I'm just going to school in it, underscoring the sloppy way that's the image initialization file inside + +112 +00:08:42,000 --> 00:08:43,000 +this folder. + +113 +00:08:43,000 --> 00:08:50,000 +Here we need to write from dot import initiate driver. + +114 +00:08:51,000 --> 00:08:52,000 +That is a line. + +115 +00:08:52,000 --> 00:08:55,000 +We need to add in this in a big way, which is inside the base. + +116 +00:08:56,000 --> 00:09:03,000 +This base is a folder, but I want to treat this base as a big package because we can give the name + +117 +00:09:03,000 --> 00:09:08,000 +of the package over here so that we can use all the files incited by default. + +118 +00:09:08,000 --> 00:09:09,000 +We cannot use it like that. + +119 +00:09:09,000 --> 00:09:10,000 +We have to write. + +120 +00:09:11,000 --> 00:09:15,000 +We have to create a file with the name underscore, underscore in it, underscore, underscore, but + +121 +00:09:15,000 --> 00:09:15,000 +be late. + +122 +00:09:16,000 --> 00:09:20,000 +And we have to add this line from dot means from the current location. + +123 +00:09:20,000 --> 00:09:21,000 +Import each driver. + +124 +00:09:22,000 --> 00:09:26,000 +Now everything is OK, I just go there. + +125 +00:09:27,000 --> 00:09:29,000 +So all the changes has been done. + +126 +00:09:29,000 --> 00:09:34,000 +Like, I just want to show it again one more time, like in base. + +127 +00:09:35,000 --> 00:09:38,000 +First of all, we have a file with which is having methods. + +128 +00:09:38,000 --> 00:09:44,000 +Also, we need to create an init file and it file we need to mention from taught means from current + +129 +00:09:44,000 --> 00:09:47,000 +location, import, initial driver. + +130 +00:09:47,000 --> 00:09:51,000 +Now if you create then files inside this base. + +131 +00:09:51,000 --> 00:09:57,000 +So we need to make entry of all the 10 files here in the same way. + +132 +00:09:58,000 --> 00:10:01,000 +I want this discussed folder to be treated as a module. + +133 +00:10:01,000 --> 00:10:05,000 +As of now, we have files and two folders only. + +134 +00:10:05,000 --> 00:10:06,000 +So I'm just going to teskey this folder. + +135 +00:10:07,000 --> 00:10:13,000 +We have only one test case, so we need to make entering the init file like from dot import. + +136 +00:10:13,000 --> 00:10:15,000 +This means on current location, import this. + +137 +00:10:16,000 --> 00:10:21,000 +So now if we have then disguises, so we need to make entry 10 files here. + +138 +00:10:22,000 --> 00:10:28,000 +So here, if you notice everything is done now, try to execute. + +139 +00:10:32,000 --> 00:10:33,000 +Nice try to execute. + +140 +00:10:33,000 --> 00:10:41,000 +So we are on the project level, and now I need to mention fight dust and in which folder we have discuses. + +141 +00:10:43,000 --> 00:10:50,000 +In this folder, one thing I just want to reiterate, if you don't create this image file, this folder + +142 +00:10:50,000 --> 00:10:52,000 +will not be treated as a package. + +143 +00:10:53,000 --> 00:10:58,000 +In that case, it will be treated as a folder and we cannot execute folder by the typist. + +144 +00:10:59,000 --> 00:11:01,000 +So that's why we have to create in it, file and in it file. + +145 +00:11:01,000 --> 00:11:07,000 +We have to make entry of all the discuses in the same way when we are importing any word from the base. + +146 +00:11:08,000 --> 00:11:10,000 +So base itself is not a package. + +147 +00:11:10,000 --> 00:11:11,000 +It just a folder. + +148 +00:11:11,000 --> 00:11:13,000 +I want to read this piece as a package. + +149 +00:11:14,000 --> 00:11:15,000 +That's why we have created in it. + +150 +00:11:15,000 --> 00:11:17,000 +And we have made and present it. + +151 +00:11:18,000 --> 00:11:19,000 +Now everything is OK. + +152 +00:11:19,000 --> 00:11:21,000 +I just execute that. + +153 +00:11:21,000 --> 00:11:30,000 +You will notice if you start browser enter the URL means I'm successfully able to call Method, which + +154 +00:11:30,000 --> 00:11:31,000 +is starting browser. + +155 +00:11:32,000 --> 00:11:38,000 +And if you notice it was entering some data into that, so everything is done here. + +156 +00:11:38,000 --> 00:11:39,000 +My desk is executing successfully. + +157 +00:11:40,000 --> 00:11:41,000 +The task is done. + +158 +00:11:43,000 --> 00:11:47,000 +So we have distributed are called into the base was and biscuits. + +159 +00:11:48,000 --> 00:11:49,000 +If I go to the desk as file. + +160 +00:11:49,000 --> 00:11:51,000 +So here we are, just starting Boza. + +161 +00:11:52,000 --> 00:11:53,000 +And that is coming from the base. + +162 +00:11:54,000 --> 00:11:59,000 +We are doing some task and at the end I'm closing bosom to show you one more time. + +163 +00:11:59,000 --> 00:12:01,000 +I'll just go to the application. + +164 +00:12:01,000 --> 00:12:03,000 +I'll fetch a few more locators. + +165 +00:12:05,000 --> 00:12:06,000 +I'm just coming here to inspect. + +166 +00:12:07,000 --> 00:12:12,000 +And that's my second locator rioting here. + +167 +00:12:12,000 --> 00:12:16,000 +Like dry word dot find element by name. + +168 +00:12:19,000 --> 00:12:23,000 +And I want to enter a. + +169 +00:12:24,000 --> 00:12:27,000 +So now I'm coming here and going to execute one more time. + +170 +00:12:28,000 --> 00:12:31,000 +You will notice it will start browser. + +171 +00:12:31,000 --> 00:12:37,000 +It will do task on different elements and then close browser. + +172 +00:12:43,000 --> 00:12:45,000 +So if you notice it will then bring data. + +173 +00:12:47,000 --> 00:12:48,000 +Everything is done. + +174 +00:12:49,000 --> 00:12:50,000 +So here we have + +175 +00:12:53,000 --> 00:13:00,000 +created a base good scored on a different package or as a different folder, which is starting buzzer, + +176 +00:13:00,000 --> 00:13:04,000 +but the URL maximize window and close browser advantages. + +177 +00:13:04,000 --> 00:13:07,000 +Now, if we create many disk cases here, we have only one test case. + +178 +00:13:07,000 --> 00:13:09,000 +If I want to create one more disk, it's OK. + +179 +00:13:09,000 --> 00:13:22,000 +I come here and I'm going to create one more test case like Test B C 002, and I'll see invalid data + +180 +00:13:24,000 --> 00:13:25,000 +registration. + +181 +00:13:25,000 --> 00:13:28,000 +You can give any name I'm just giving in relative to the solution. + +182 +00:13:28,000 --> 00:13:34,000 +OK, now first of all, whatever the file you have created, we need to make entries in it. + +183 +00:13:34,000 --> 00:13:42,000 +So I'm going here from dark import and I just given the name of that second file. + +184 +00:13:43,000 --> 00:13:52,000 +Second is I'm coming here and you want to create GIFs or death and test registration. + +185 +00:13:57,000 --> 00:14:00,000 +Invalid data, OK? + +186 +00:14:01,000 --> 00:14:10,000 +And before that, we need to import like from bass import initiated driver. + +187 +00:14:10,000 --> 00:14:18,000 +Now I want to start browsers, so driver is equal is equal to initiate driver dot start browser now + +188 +00:14:18,000 --> 00:14:25,000 +driver dart find element by something and you know how to fetch locators. + +189 +00:14:25,000 --> 00:14:30,000 +I'm just coming to the third element fetching its locator. + +190 +00:14:31,000 --> 00:14:38,000 +My point is now whatever the number of test kits we are going to create, we are not riding the initial + +191 +00:14:38,000 --> 00:14:42,000 +driver or browser start or again and again that is placed on a separate list. + +192 +00:14:42,000 --> 00:14:44,000 +We're using it in all the sketches. + +193 +00:14:45,000 --> 00:14:53,000 +So now if I go and execute that in this test folder, now the Autodesk's is sort of executed by the + +194 +00:14:53,000 --> 00:14:55,000 +risk is so for ticket two items. + +195 +00:14:56,000 --> 00:14:58,000 +First item is executing. + +196 +00:15:03,000 --> 00:15:05,000 +And then it's going to the second one. + +197 +00:15:07,000 --> 00:15:13,000 +So now being scored is placed separately and wherever required, we are just using it. + +198 +00:15:15,000 --> 00:15:16,000 +So that is done. + +199 +00:15:17,000 --> 00:15:23,000 +So we have seen what is the advantage of placing based on separate location and how we can use it? + +200 +00:15:23,000 --> 00:15:29,000 +And the important thing is this in it failed because if that file does not exist when we are executing, + +201 +00:15:30,000 --> 00:15:32,000 +it will treat it as a failure. + +202 +00:15:32,000 --> 00:15:33,000 +But now we are saying that is not a. + +203 +00:15:34,000 --> 00:15:40,000 +It's a package or module in the same way in this base, whatever the files we are having. + +204 +00:15:41,000 --> 00:15:44,000 +But business itself is a directory list in it. + +205 +00:15:44,000 --> 00:15:47,000 +File makers directory as a module. + +206 +00:15:49,000 --> 00:15:52,000 +So in next sessions, we are going to create many more in it files. + +207 +00:15:55,000 --> 00:15:58,000 +Here we have seen how we can create based that all we have. + +208 +00:15:58,000 --> 00:15:59,000 +Thanks for watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/003 Create & Read data from Config File (Manage Configuration Data)_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/003 Create & Read data from Config File (Manage Configuration Data)_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..e2d564023f0cf325e69bc61bc401177aa9ad99e7 --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/003 Create & Read data from Config File (Manage Configuration Data)_en.srt @@ -0,0 +1,976 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the wrestling world. + +2 +00:00:03,000 --> 00:00:09,000 +So previously, we have seen how we can place gold separately in the bass whales now to show you how + +3 +00:00:09,000 --> 00:00:13,000 +we can write configurable data on a separate list and how we can use it. + +4 +00:00:14,000 --> 00:00:19,000 +So first of all, we are going to create a convict file whatever the data that we think could change. + +5 +00:00:19,000 --> 00:00:24,000 +We are going to place it in config file and then we are going to use it. + +6 +00:00:24,000 --> 00:00:31,000 +Later on, I'll show you how you can place our driver executable and use it related part of the driver + +7 +00:00:31,000 --> 00:00:31,000 +executable. + +8 +00:00:32,000 --> 00:00:35,000 +So I'm just moving to the same project that we had in the previous session. + +9 +00:00:35,000 --> 00:00:42,000 +Now, if I go to base, I'm just closing all these files, so I'm just going to the base and initiate + +10 +00:00:42,000 --> 00:00:42,000 +driver. + +11 +00:00:43,000 --> 00:00:46,000 +You will check here you are, which we are using. + +12 +00:00:47,000 --> 00:00:48,000 +I put the static, you are here. + +13 +00:00:49,000 --> 00:00:52,000 +But it might be possible that URL could be changed. + +14 +00:00:52,000 --> 00:00:57,000 +Like today, I want to execute my test case on you, Indian woman. + +15 +00:00:57,000 --> 00:00:59,000 +Tomorrow, I want to execute on the Cuban woman. + +16 +00:00:59,000 --> 00:01:01,000 +Then I want to execute on the Devin woman. + +17 +00:01:01,000 --> 00:01:08,000 +So this duplicate change also as of now, we are creating the object of the Chrome browser. + +18 +00:01:08,000 --> 00:01:12,000 +But later on, I want to execute on the Firefox browser Firefox browser. + +19 +00:01:12,000 --> 00:01:15,000 +Then we need to create a configuration file where we can, right? + +20 +00:01:15,000 --> 00:01:17,000 +Where we want, which browser we want to use. + +21 +00:01:17,000 --> 00:01:19,000 +What do you really want to use? + +22 +00:01:19,000 --> 00:01:21,000 +So we can create a configurable file for this. + +23 +00:01:22,000 --> 00:01:26,000 +I'm just going to the configuration and going to create a Python file with the name. + +24 +00:01:28,000 --> 00:01:36,000 +First of all, I'm going to create a file with the name config dot CMG. + +25 +00:01:36,000 --> 00:01:38,000 +We know that how to work on the config files. + +26 +00:01:39,000 --> 00:01:42,000 +It's a simple text file with the DOT. + +27 +00:01:43,000 --> 00:01:50,000 +The department know how to write configuration file, so we know that Schaerbeek at first we need a + +28 +00:01:50,000 --> 00:01:51,000 +different section. + +29 +00:01:52,000 --> 00:01:52,000 +So I'm seeing. + +30 +00:01:55,000 --> 00:02:01,000 +Details, my S. name is details inside that I'm seeing application. + +31 +00:02:04,000 --> 00:02:04,000 +You are ill. + +32 +00:02:05,000 --> 00:02:09,000 +And second, I want to maintain browser. + +33 +00:02:11,000 --> 00:02:13,000 +No, I'm just. + +34 +00:02:15,000 --> 00:02:20,000 +Picking that, you are all from here and maintaining in my country quite in the same way. + +35 +00:02:21,000 --> 00:02:24,000 +Rather, I'm giving that Graham, so I'll pick this data one by one. + +36 +00:02:26,000 --> 00:02:35,000 +If you want to big data from this config file, first of all, we need to write code for reading data + +37 +00:02:35,000 --> 00:02:36,000 +from the config file. + +38 +00:02:36,000 --> 00:02:41,000 +And that code could be common because we can have a lot of data that we need to read. + +39 +00:02:41,000 --> 00:02:46,000 +So rather than writing that code on the test, the skills level, we are going to the library because + +40 +00:02:46,000 --> 00:02:49,000 +that will mean library code that will be at the usable code. + +41 +00:02:49,000 --> 00:02:54,000 +I'm going to the library and I'm creating a file python file here. + +42 +00:02:55,000 --> 00:02:58,000 +I'm seeing config reader. + +43 +00:03:01,000 --> 00:03:08,000 +Now we know that how to read data from the config files, so first of all, from first of all, we need + +44 +00:03:08,000 --> 00:03:17,000 +to import, so I'm say import config, parcel def read config data. + +45 +00:03:18,000 --> 00:03:25,000 +And I just won't send me section because we know that while reading the data, we need to read section + +46 +00:03:25,000 --> 00:03:31,000 +as well as we also need to read geeky means rich data you won't read. + +47 +00:03:31,000 --> 00:03:32,000 +So I want to read this. + +48 +00:03:32,000 --> 00:03:35,000 +I want to read data which is written in front of this guy. + +49 +00:03:36,000 --> 00:03:41,000 +So first of all, I just need to go for like config password, dot config password. + +50 +00:03:42,000 --> 00:03:48,000 +First of all, I'm creating objeto the config parser and that is CFD. + +51 +00:03:49,000 --> 00:03:53,000 +So I just could config parser object see Avg. + +52 +00:03:54,000 --> 00:04:01,000 +But I'll say I'll give the name config and conflicto object name is config dot. + +53 +00:04:02,000 --> 00:04:05,000 +Read which file you want to read. + +54 +00:04:06,000 --> 00:04:14,000 +Now we need to give part of the file a configuration file, which is based here how we can give the + +55 +00:04:14,000 --> 00:04:16,000 +parts, so now we need to give relative path. + +56 +00:04:16,000 --> 00:04:20,000 +And we know how to generate relative path hidden python. + +57 +00:04:21,000 --> 00:04:24,000 +So my location is I'm inside the library. + +58 +00:04:24,000 --> 00:04:26,000 +I want to move one folder up. + +59 +00:04:26,000 --> 00:04:27,000 +So as of now, I'm in the library folder. + +60 +00:04:28,000 --> 00:04:31,000 +If I move one folder up, I'll bring the project level. + +61 +00:04:31,000 --> 00:04:33,000 +So I set Dot Forward Slash. + +62 +00:04:33,000 --> 00:04:38,000 +Then go to the configuration file folder, something called ft. + +63 +00:04:38,000 --> 00:04:44,000 +Duration files inside that we have a file config. + +64 +00:04:46,000 --> 00:04:58,000 +Dot CMG, everything is OK now I want to pick a data from their second fig dot get first, we need to + +65 +00:04:58,000 --> 00:04:59,000 +fast section. + +66 +00:04:59,000 --> 00:05:06,000 +So my section, which is sent by the user and second is key. + +67 +00:05:07,000 --> 00:05:16,000 +So, OK, so it is going to fetch value from the config file and I'm just returning it to return whatever + +68 +00:05:16,000 --> 00:05:21,000 +the value was dispatched before actually using it. + +69 +00:05:22,000 --> 00:05:25,000 +I just want to check that is working or not how we can check it. + +70 +00:05:26,000 --> 00:05:27,000 +It's a simple python file. + +71 +00:05:27,000 --> 00:05:32,000 +So what I can do, I'm just calling this method hit on the same file. + +72 +00:05:33,000 --> 00:05:42,000 +I'm just going for the read config and section is details, OK? + +73 +00:05:44,000 --> 00:05:45,000 +And the key is. + +74 +00:05:48,000 --> 00:05:49,000 +Application you are. + +75 +00:05:53,000 --> 00:06:01,000 +Going to print it, so print what I'm doing, I just created this method and to check this method is + +76 +00:06:01,000 --> 00:06:02,000 +working perfectly or not. + +77 +00:06:02,000 --> 00:06:07,000 +I'm just calling in the same file now all day to execute this python file. + +78 +00:06:07,000 --> 00:06:13,000 +And this, if this method is giving the correct output, means yes, this method is working correctly. + +79 +00:06:13,000 --> 00:06:18,000 +So how we can execute, we know that I'm just and before execution, I just want to make minor changes + +80 +00:06:18,000 --> 00:06:18,000 +when we go. + +81 +00:06:18,000 --> 00:06:20,000 +Want to go one follow up? + +82 +00:06:20,000 --> 00:06:22,000 +We need to double talk. + +83 +00:06:22,000 --> 00:06:23,000 +So I just done that. + +84 +00:06:24,000 --> 00:06:24,000 +I'm running it. + +85 +00:06:25,000 --> 00:06:33,000 +So if you notice it is picking the value of the cookie means that yes, we are able to successfully + +86 +00:06:33,000 --> 00:06:35,000 +get data from the config file. + +87 +00:06:36,000 --> 00:06:40,000 +Now we can use this method in our test cases in our project. + +88 +00:06:42,000 --> 00:06:43,000 +So everything is done. + +89 +00:06:44,000 --> 00:06:46,000 +I'm just removing this line. + +90 +00:06:48,000 --> 00:06:53,000 +No, I want to fetch and use this data in my base. + +91 +00:06:54,000 --> 00:07:01,000 +But we know that if we want to use any file which is placed in any other folder, first of all, we + +92 +00:07:01,000 --> 00:07:02,000 +need to create an ID file. + +93 +00:07:03,000 --> 00:07:13,000 +So I just go to the library and in it not be way because I want to create this library as it module. + +94 +00:07:13,000 --> 00:07:16,000 +So again, I go there and we know how to write it. + +95 +00:07:16,000 --> 00:07:17,000 +Like what? + +96 +00:07:17,000 --> 00:07:24,000 +Right from dart import config reader that is also done. + +97 +00:07:25,000 --> 00:07:31,000 +Now I want to go to the initial driver and I want to use library file here. + +98 +00:07:31,000 --> 00:07:32,000 +So from. + +99 +00:07:34,000 --> 00:07:49,000 +I'm think library import and my file name was conflict reader here, we want to get you all something + +100 +00:07:51,000 --> 00:07:57,000 +Configurator Dot read reconfigured a section so which data you want to read? + +101 +00:07:57,000 --> 00:07:59,000 +I want to read this. + +102 +00:08:02,000 --> 00:08:07,000 +And what is the second argument, second argument means which you want to use application you other? + +103 +00:08:08,000 --> 00:08:11,000 +So I'll explain it one more time, what we have done here. + +104 +00:08:11,000 --> 00:08:17,000 +First of all, we have created a config file, so that's my one frequent word we have placed. + +105 +00:08:17,000 --> 00:08:20,000 +We have created a section and all the key in value. + +106 +00:08:21,000 --> 00:08:24,000 +Then I'm going to the library here. + +107 +00:08:25,000 --> 00:08:29,000 +We have created a python file in which we have a method which is going to read data from the config + +108 +00:08:29,000 --> 00:08:29,000 +file. + +109 +00:08:29,000 --> 00:08:31,000 +We just need to pass section and the key. + +110 +00:08:31,000 --> 00:08:40,000 +It will read the data and return that value because this file I want to use relatively in my other code. + +111 +00:08:41,000 --> 00:08:44,000 +So that's why we have to create it in it, in it, in this folder. + +112 +00:08:45,000 --> 00:08:49,000 +And I've just written from that import configurator. + +113 +00:08:49,000 --> 00:08:52,000 +So this folder library folder will be treated as a module. + +114 +00:08:52,000 --> 00:08:52,000 +No. + +115 +00:08:53,000 --> 00:08:59,000 +Then I go to the base and here I want to pick data from config file. + +116 +00:08:59,000 --> 00:09:01,000 +So I'm just using the method that we've created. + +117 +00:09:01,000 --> 00:09:03,000 +Configurator Dot reconfigured. + +118 +00:09:03,000 --> 00:09:08,000 +So it means this method will be called it need to value section. + +119 +00:09:08,000 --> 00:09:12,000 +And the key some parsing section is detail gives application. + +120 +00:09:12,000 --> 00:09:18,000 +You are now this method will work, will pick data from the configuration file and going to return it. + +121 +00:09:18,000 --> 00:09:25,000 +Whatever the data which is written, will be placed here, so everything seems to be OK. + +122 +00:09:25,000 --> 00:09:28,000 +So that is done now before execution. + +123 +00:09:28,000 --> 00:09:33,000 +I just want to make one more change, which I want to explain you previously we have seen when we are + +124 +00:09:33,000 --> 00:09:34,000 +writing config reader. + +125 +00:09:34,000 --> 00:09:37,000 +So here we are giving the part and that part is correct. + +126 +00:09:37,000 --> 00:09:38,000 +We are able to run it. + +127 +00:09:39,000 --> 00:09:42,000 +But at that time we are executing this file. + +128 +00:09:42,000 --> 00:09:47,000 +So yet generating this bot as related to this file. + +129 +00:09:47,000 --> 00:09:51,000 +But now all the part, we need to give the letter to the project. + +130 +00:09:52,000 --> 00:10:00,000 +So if you notice this configuration file inside the project itself and when we execute our test is we + +131 +00:10:00,000 --> 00:10:01,000 +know that we are on the project level. + +132 +00:10:02,000 --> 00:10:06,000 +So minor changes that whenever we are doing the part and we are going to execute it from the project + +133 +00:10:06,000 --> 00:10:08,000 +level, it should be dot forward slash. + +134 +00:10:09,000 --> 00:10:13,000 +So just this minor change we have to do now, I'll explain one more time what I have done. + +135 +00:10:13,000 --> 00:10:14,000 +I was just created a config file here. + +136 +00:10:14,000 --> 00:10:15,000 +We have all the details. + +137 +00:10:16,000 --> 00:10:24,000 +Then I have created a library file, which is reading the data from the config file and returning it. + +138 +00:10:24,000 --> 00:10:29,000 +And we are passing section and the key and the same thing we are using in base. + +139 +00:10:30,000 --> 00:10:34,000 +So here we are, calling reconfigured the method by passing two arguments. + +140 +00:10:35,000 --> 00:10:37,000 +One is section and key. + +141 +00:10:37,000 --> 00:10:39,000 +So this is going here. + +142 +00:10:40,000 --> 00:10:43,000 +Here it is, picking the data from the Countryfile and returning that. + +143 +00:10:43,000 --> 00:10:44,000 +So everything is OK. + +144 +00:10:44,000 --> 00:10:50,000 +I just want to execute and show you if everything is executing correctly means yes. + +145 +00:10:50,000 --> 00:10:53,000 +We are able to successfully read data from the config file. + +146 +00:10:57,000 --> 00:11:02,000 +So you are a little open means, yes, we are able to pick data from config file. + +147 +00:11:05,000 --> 00:11:07,000 +Let it execute, then I'll move to the next step. + +148 +00:11:10,000 --> 00:11:19,000 +So that is done now in the same way, if you want to pick browser, so what I'm going to do here, I'm + +149 +00:11:19,000 --> 00:11:25,000 +going to the base and I want to read browser name. + +150 +00:11:25,000 --> 00:11:27,000 +So first of all, I'm saying. + +151 +00:11:29,000 --> 00:11:31,000 +I just copied this. + +152 +00:11:33,000 --> 00:11:41,000 +And I'm coming here if and I'm picking browser this time, so. + +153 +00:11:44,000 --> 00:11:46,000 +If we are picking this data. + +154 +00:11:50,000 --> 00:11:55,000 +We are picking this data if this data is equal to growing. + +155 +00:11:57,000 --> 00:12:07,000 +Then we need to create grown driver object, so here I'm writing the part for Chrome. + +156 +00:12:09,000 --> 00:12:13,000 +Alice, if I'm going to explain it one more time. + +157 +00:12:13,000 --> 00:12:17,000 +So Alice and my condition is. + +158 +00:12:20,000 --> 00:12:21,000 +Firefox. + +159 +00:12:26,000 --> 00:12:37,000 +In that case, we need to give part of the fire, folks, and we need to create object of fire force. + +160 +00:12:38,000 --> 00:12:47,000 +So first of all, I'm just importing fire folks or from selenium, dark web driver import Firefox, + +161 +00:12:48,000 --> 00:12:50,000 +and I'm writing Firefox here. + +162 +00:12:51,000 --> 00:12:53,000 +I'll explain it one more time. + +163 +00:12:55,000 --> 00:13:03,000 +So what I'm doing now, I'm reading browser detail from that config file and I'm checking if it's a + +164 +00:13:03,000 --> 00:13:07,000 +Chrome, then set the path of the chrome and create driver object of the chrome. + +165 +00:13:08,000 --> 00:13:15,000 +If that is Firefox, then execute, said the path of the Firefox and execute on the Firefox. + +166 +00:13:16,000 --> 00:13:19,000 +So this spot we need to give before the Firefox Gecko driver. + +167 +00:13:20,000 --> 00:13:26,000 +So hope you remember previously I have shown you how we can execute by using Google Drive or I'm just + +168 +00:13:26,000 --> 00:13:26,000 +copying. + +169 +00:13:26,000 --> 00:13:31,000 +I'm just copying the part that the gecko driver, I just copied it. + +170 +00:13:32,000 --> 00:13:37,000 +And here Google Drive were not easy. + +171 +00:13:39,000 --> 00:13:40,000 +That's a good idea. + +172 +00:13:40,000 --> 00:13:41,000 +Not easy. + +173 +00:13:42,000 --> 00:13:44,000 +No, everything is OK now. + +174 +00:13:44,000 --> 00:13:49,000 +We have control which browser you want to execute from the config file. + +175 +00:13:50,000 --> 00:13:52,000 +Now I'm going to the config file. + +176 +00:13:52,000 --> 00:13:53,000 +As of now, it's a chrome. + +177 +00:13:53,000 --> 00:14:00,000 +So when we execute, it should execute on the Chrome browser, display a screen, execute. + +178 +00:14:03,000 --> 00:14:05,000 +This time, execution should be on the crown. + +179 +00:14:06,000 --> 00:14:12,000 +It shows a mistake, I'm just going there on the base and what mistake I have done. + +180 +00:14:13,000 --> 00:14:13,000 +OK, yeah. + +181 +00:14:14,000 --> 00:14:19,000 +In case of the pot, I just have to use the backwards slash. + +182 +00:14:22,000 --> 00:14:24,000 +So I'm just giving double backwards, OK? + +183 +00:14:26,000 --> 00:14:34,000 +And at the end, I'm saying, OK, if both the conditions in above conditions are not true, then I'll + +184 +00:14:34,000 --> 00:14:42,000 +see if you'll use those not giving any browser name or giving wrong browser name. + +185 +00:14:42,000 --> 00:14:49,000 +So in that case, it should create Chrome browser object. + +186 +00:14:49,000 --> 00:14:56,000 +I just give him the name like Chrome is our default, but if if a user is giving so accordingly, it + +187 +00:14:56,000 --> 00:15:02,000 +will execute, but if not giving, if giving incorrect, then Chrome Chrome browser should work. + +188 +00:15:02,000 --> 00:15:04,000 +But I say it should work on the Chrome browser. + +189 +00:15:05,000 --> 00:15:06,000 +I'm just going to the terminal. + +190 +00:15:09,000 --> 00:15:16,000 +And going to execute again, trip by dust and dust gives us. + +191 +00:15:19,000 --> 00:15:25,000 +This time it should execute on Chrome because users set Chrome there, I'll make some changes and not + +192 +00:15:26,000 --> 00:15:28,000 +show you how it's executed on the different browsers. + +193 +00:15:28,000 --> 00:15:30,000 +So first of all, it's working on the Chrome. + +194 +00:15:32,000 --> 00:15:35,000 +One test gets executed and going for the second Test case. + +195 +00:15:45,000 --> 00:15:46,000 +Done. + +196 +00:15:47,000 --> 00:15:53,000 +And if you want to execute on the Firefox, so what I can do, I'll just go there. + +197 +00:15:53,000 --> 00:15:55,000 +I'll set it Firefox. + +198 +00:15:58,000 --> 00:16:01,000 +And now we are executing. + +199 +00:16:08,000 --> 00:16:16,000 +So by test and test cases, so it should execute on Firefox this time. + +200 +00:16:16,000 --> 00:16:18,000 +So now we have controlled ah, execution. + +201 +00:16:20,000 --> 00:16:23,000 +It is getting failed because we have mentioned easy two times here. + +202 +00:16:23,000 --> 00:16:25,000 +I just corrected it, I just corrected it. + +203 +00:16:26,000 --> 00:16:28,000 +And now executing again. + +204 +00:16:28,000 --> 00:16:30,000 +So this time it should execute on the Firefox. + +205 +00:16:33,000 --> 00:16:40,000 +So we've controlled browser and the URL from configuration file. + +206 +00:16:42,000 --> 00:16:48,000 +Here, Firefox browser started and the task would be performed, Firefox is much slow as compared to + +207 +00:16:48,000 --> 00:16:53,000 +the Chrome, so you can use any of the browser if you want. + +208 +00:16:53,000 --> 00:16:57,000 +So now first US cases executing, then we'll go for the second in this case. + +209 +00:17:00,000 --> 00:17:03,000 +Then so if you notice everything is done successfully. + +210 +00:17:06,000 --> 00:17:07,000 +Nazi the second disc. + +211 +00:17:11,000 --> 00:17:12,000 +The results are done. + +212 +00:17:13,000 --> 00:17:20,000 +So now you've seen how we can control our execution from how we can control browser and the URL from + +213 +00:17:20,000 --> 00:17:21,000 +config file. + +214 +00:17:21,000 --> 00:17:26,000 +So I would just use, if else I'm reading the browser title from config file. + +215 +00:17:26,000 --> 00:17:29,000 +I'm checking if it's a Chrome, then create Chrome browser object. + +216 +00:17:29,000 --> 00:17:35,000 +It's the Firefox Grade five, whatever object grade five star object. + +217 +00:17:35,000 --> 00:17:39,000 +If nothing is provided or incorrect values provided, then go for Chrome. + +218 +00:17:42,000 --> 00:17:46,000 +So here in the session, we have seen this one thing which is pending. + +219 +00:17:47,000 --> 00:17:50,000 +Now I want to make a driver folder here. + +220 +00:17:52,000 --> 00:17:58,000 +So I'm just coming here and new, and I'm grading it directly with the driver putting. + +221 +00:17:59,000 --> 00:18:00,000 +Already we have a driver. + +222 +00:18:01,000 --> 00:18:08,000 +Now I'm putting all these easy files, so I'm just coming here on the GEICO driver. + +223 +00:18:08,000 --> 00:18:13,000 +Just copied it, pasted over here in the same way. + +224 +00:18:16,000 --> 00:18:23,000 +I'm just coming for a chrome driver, copied blizzard over here. + +225 +00:18:24,000 --> 00:18:25,000 +Now we need to give, but. + +226 +00:18:26,000 --> 00:18:29,000 +So how we can give the relative path I'm riding like dart forward slash. + +227 +00:18:30,000 --> 00:18:31,000 +That's my project. + +228 +00:18:32,000 --> 00:18:38,000 +Inside the project, go to the driver folder that get Chrome, Driver wrote in the same way, I'm just + +229 +00:18:38,000 --> 00:18:38,000 +writing for this. + +230 +00:18:41,000 --> 00:18:44,000 +Dart forward slash driver vehicle driver. + +231 +00:18:45,000 --> 00:18:51,000 +So we replaced these driver fires inside the project and giving the reality part of these files. + +232 +00:18:52,000 --> 00:18:57,000 +Everything is okay and I'm going for my config file. + +233 +00:18:57,000 --> 00:19:00,000 +I will say I want to execute on Chrome. + +234 +00:19:01,000 --> 00:19:01,000 +Done. + +235 +00:19:02,000 --> 00:19:03,000 +I just want to execute. + +236 +00:19:03,000 --> 00:19:11,000 +So moving to the terminal and I'm saying by test and the folder name is just guesses. + +237 +00:19:14,000 --> 00:19:22,000 +Now it will execute, still, the browser starting means, yes, we are able to successfully execute + +238 +00:19:23,000 --> 00:19:26,000 +Chrome driver easy file by giving the relative part. + +239 +00:19:29,000 --> 00:19:33,000 +So here in the session, whatever we have, we want to cover that is done. + +240 +00:19:33,000 --> 00:19:38,000 +Here we have covered how we can create config file, how we can write data to the config file use data + +241 +00:19:38,000 --> 00:19:46,000 +from the config file placed driver executable inside the project and use relative path that all the + +242 +00:19:46,000 --> 00:19:48,000 +tasks we have done in current session. + +243 +00:19:51,000 --> 00:19:53,000 +So that's all we have for the session. + +244 +00:19:53,000 --> 00:19:54,000 +Thanks for watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/004 Manage Element Locators in Config File_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/004 Manage Element Locators in Config File_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..48db1d85b8db216b2eefcb030041fd132bb3f813 --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/004 Manage Element Locators in Config File_en.srt @@ -0,0 +1,376 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:06,000 +So previously, we have seen how we can read data from the config file. + +3 +00:00:06,000 --> 00:00:15,000 +And previously we are picking browser name and you are from the conflict fighting now show you how we + +4 +00:00:15,000 --> 00:00:17,000 +can manage our element locators. + +5 +00:00:18,000 --> 00:00:22,000 +As of now, we are writing element locators in our test case file. + +6 +00:00:22,000 --> 00:00:23,000 +But that's not a good approach. + +7 +00:00:23,000 --> 00:00:24,000 +Why? + +8 +00:00:24,000 --> 00:00:29,000 +Because element locators could change very frequently. + +9 +00:00:29,000 --> 00:00:34,000 +So every time when that locator is getting change will have to go to the code files and make changes + +10 +00:00:34,000 --> 00:00:35,000 +over there. + +11 +00:00:36,000 --> 00:00:40,000 +And that task can be done by the person who has very good knowledge of the code and the domain and will + +12 +00:00:40,000 --> 00:00:44,000 +the element that is placed what all the places we need to make changes. + +13 +00:00:44,000 --> 00:00:46,000 +So person should have all the knowledge only after that. + +14 +00:00:46,000 --> 00:00:50,000 +These changes can be done and it might be possible. + +15 +00:00:50,000 --> 00:00:54,000 +One element is used on in 10 different cases, so we have to go through the 10 different discourses + +16 +00:00:55,000 --> 00:01:00,000 +and make changes, so that process could take a lot of time. + +17 +00:01:00,000 --> 00:01:06,000 +And because of that, some error get also introduced in the automation because it might be possible. + +18 +00:01:06,000 --> 00:01:11,000 +I need to make changes on five places I just mentioned just on three place. + +19 +00:01:11,000 --> 00:01:12,000 +So it will generate an error. + +20 +00:01:13,000 --> 00:01:19,000 +It might be possible that I need to change a locator, but by mistake I wouldn't be looking again. + +21 +00:01:19,000 --> 00:01:21,000 +It's going to introduce error. + +22 +00:01:21,000 --> 00:01:27,000 +So we have to place locators in a separate file so that in future, whenever we want to make changes, + +23 +00:01:28,000 --> 00:01:33,000 +we'll have to go to the one place, make changes over there and it will be used on all other places. + +24 +00:01:34,000 --> 00:01:41,000 +So previously we have created a conflict while we are where we are placing our configurable data config + +25 +00:01:41,000 --> 00:01:49,000 +file, where I'm going to place my element locators, moving to the project here in the configuration + +26 +00:01:49,000 --> 00:01:54,000 +folder, I'm just creating a new config file with the elements. + +27 +00:01:55,000 --> 00:02:01,000 +So elements dot CFT and first of all, I'm creating a section with the name registration. + +28 +00:02:03,000 --> 00:02:07,000 +And here I want to place all the registration element locators. + +29 +00:02:08,000 --> 00:02:15,000 +So whatever the element locator we have used previously, like I was using username email, I'm just + +30 +00:02:15,000 --> 00:02:18,000 +placing in elements of our config. + +31 +00:02:18,000 --> 00:02:22,000 +So username, name, name is a locator. + +32 +00:02:23,000 --> 00:02:26,000 +And then I set email name. + +33 +00:02:26,000 --> 00:02:29,000 +Then I say password name. + +34 +00:02:29,000 --> 00:02:37,000 +So all the values of the element locator I'm placing in separate config files. + +35 +00:02:37,000 --> 00:02:39,000 +So that's my first data. + +36 +00:02:42,000 --> 00:02:44,000 +And that's my second data. + +37 +00:02:46,000 --> 00:02:49,000 +In the same way, in this case, I have used this. + +38 +00:02:53,000 --> 00:02:56,000 +So as of now, I'm maintaining three element locator. + +39 +00:02:56,000 --> 00:03:01,000 +You can maintain all your element locators here in the separate config file. + +40 +00:03:03,000 --> 00:03:06,000 +Once you're done that, we need to read these locators. + +41 +00:03:07,000 --> 00:03:12,000 +So for reading the locators, I'm going to create a method previously. + +42 +00:03:12,000 --> 00:03:18,000 +Also, we have created a library file in that we have a method like read config data in the same way + +43 +00:03:18,000 --> 00:03:22,000 +I'm going to create a method read on. + +44 +00:03:22,000 --> 00:03:29,000 +I see fetch element locators again. + +45 +00:03:29,000 --> 00:03:32,000 +We need section and key. + +46 +00:03:33,000 --> 00:03:35,000 +Then some code will be same. + +47 +00:03:35,000 --> 00:03:39,000 +So I'm just copying this and pasting over here. + +48 +00:03:39,000 --> 00:03:41,000 +So previously we have seen how we can read it. + +49 +00:03:41,000 --> 00:03:46,000 +So it's this very simple code in which we are displaying for the config parser reading the file. + +50 +00:03:46,000 --> 00:03:54,000 +But this time my file name is elements and we are passing section and the key. + +51 +00:03:54,000 --> 00:03:56,000 +It will return that locator. + +52 +00:03:58,000 --> 00:04:02,000 +So method is straightforward that we have created in the previous session the same method we are creating + +53 +00:04:02,000 --> 00:04:02,000 +over here. + +54 +00:04:03,000 --> 00:04:04,000 +Know how to use it. + +55 +00:04:04,000 --> 00:04:09,000 +So I'm going to my test case and to use it again. + +56 +00:04:09,000 --> 00:04:11,000 +First of all, we need to import that. + +57 +00:04:11,000 --> 00:04:14,000 +So I'm going for I'm going here like from. + +58 +00:04:17,000 --> 00:04:21,000 +Library in Port Config, reader. + +59 +00:04:22,000 --> 00:04:32,000 +And here I need to pass config reader, dart fetch element subsection and key, we need to pass, so + +60 +00:04:32,000 --> 00:04:33,000 +I'm passing section. + +61 +00:04:33,000 --> 00:04:39,000 +Here is the registration and the key is here. + +62 +00:04:39,000 --> 00:04:40,000 +We need to pass. + +63 +00:04:45,000 --> 00:04:46,000 +Password. + +64 +00:04:50,000 --> 00:04:56,000 +In the same way, we just need to use the same line, all the places where we are born to pick data + +65 +00:04:56,000 --> 00:05:05,000 +from Element or CFD, so I'm coming here and just writing these lines getting error because we did not + +66 +00:05:05,000 --> 00:05:07,000 +imported import here. + +67 +00:05:07,000 --> 00:05:13,000 +So from library import config reader. + +68 +00:05:14,000 --> 00:05:16,000 +And again, what is the key? + +69 +00:05:16,000 --> 00:05:21,000 +So this time I want to pass user name. + +70 +00:05:22,000 --> 00:05:27,000 +I want to fetch username and I want to fetch e-mail. + +71 +00:05:29,000 --> 00:05:34,000 +I have just placed all the locators in a separate file, so I just go there. + +72 +00:05:34,000 --> 00:05:37,000 +That's my separate file with all the locators are placed. + +73 +00:05:38,000 --> 00:05:45,000 +And I've also created a method which is going to read locator from the config file and going to return + +74 +00:05:45,000 --> 00:05:45,000 +that value. + +75 +00:05:46,000 --> 00:05:50,000 +So that is similar to the config data and in discuses. + +76 +00:05:50,000 --> 00:05:51,000 +We're using that. + +77 +00:05:52,000 --> 00:05:56,000 +So everything seems to be same that we have done in the previous session, but this time together using + +78 +00:05:56,000 --> 00:06:00,000 +locators, reading locators, I just executed it. + +79 +00:06:06,000 --> 00:06:10,000 +If we get hit, it is working on the elements, so means we are successfully able to pick value from + +80 +00:06:12,000 --> 00:06:13,000 +config file. + +81 +00:06:17,000 --> 00:06:23,000 +It where we have many are located, so here it is, and indeed that means, yes, we are able to fetch + +82 +00:06:24,000 --> 00:06:27,000 +locators from the separate file separate config file. + +83 +00:06:27,000 --> 00:06:32,000 +So no advantages that whenever you want to make changes, you will have to go on one place only and + +84 +00:06:33,000 --> 00:06:34,000 +then do the changes. + +85 +00:06:34,000 --> 00:06:36,000 +It will reflect on all places. + +86 +00:06:39,000 --> 00:06:43,000 +So as of now, we are maintaining on a few locators, you can maintain all the locators of a project + +87 +00:06:43,000 --> 00:06:48,000 +into a separate Countryfile and you can create one Countryfile or more than one country. + +88 +00:06:49,000 --> 00:06:52,000 +It depend on the number of locators you want to manage. + +89 +00:06:55,000 --> 00:07:02,000 +So here in the session, we have seen how we can fetch locators from a separate config file, so we + +90 +00:07:02,000 --> 00:07:08,000 +have seen how we can manage config file right locators use located from the config and then execute + +91 +00:07:08,000 --> 00:07:11,000 +rescues so that we can check it is working correctly or not. + +92 +00:07:14,000 --> 00:07:21,000 +So here in this session, we have seen how we can manage locators in Slaney with Python. + +93 +00:07:22,000 --> 00:07:23,000 +That's all we have for the session. + +94 +00:07:23,000 --> 00:07:25,000 +Thanks for watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/005 Multi Window Handling - Handle Popup & Tab_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/005 Multi Window Handling - Handle Popup & Tab_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..c483bfc6864828f25ef175d69f4ab30ff841c0a0 --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/005 Multi Window Handling - Handle Popup & Tab_en.srt @@ -0,0 +1,936 @@ +1 +00:00:00,000 --> 00:00:08,000 +Welcome to the testing world in this session, we are going to go multi-window handling, so multi-window + +2 +00:00:08,000 --> 00:00:13,000 +handling is a concept which we are going to use while doing automation. + +3 +00:00:14,000 --> 00:00:18,000 +We are facing some pop ups or tab gets open. + +4 +00:00:19,000 --> 00:00:25,000 +I'm thinking example of the application in which if they click somewhere, a new popup gets opened or + +5 +00:00:26,000 --> 00:00:32,000 +a new tab gets opened in, that kind of situation will have to switch to that particular popup or tab + +6 +00:00:32,000 --> 00:00:38,000 +and perform task on that when we are switching to the different popups or the tabs. + +7 +00:00:38,000 --> 00:00:44,000 +The concept is called multi-window handling, so I'll show you what do you mean with multi-window handling + +8 +00:00:44,000 --> 00:00:45,000 +and how we can perform it? + +9 +00:00:47,000 --> 00:00:53,000 +First of all, I'm just moving to my application and here I'll show you multi-window handling concept. + +10 +00:00:54,000 --> 00:00:57,000 +So here I'm just going to log in and credentials. + +11 +00:00:58,000 --> 00:01:08,000 +Best test here if I go on my account and click on Update, so you will notice a new tab gets open. + +12 +00:01:09,000 --> 00:01:14,000 +So I want to open this tab and want to click on the start. + +13 +00:01:14,000 --> 00:01:16,000 +Download that task. + +14 +00:01:16,000 --> 00:01:17,000 +I want to perform. + +15 +00:01:18,000 --> 00:01:20,000 +And after that, I just want to close this tab. + +16 +00:01:21,000 --> 00:01:26,000 +So here you notice as I click on the update, a new page that's a new tab gets open. + +17 +00:01:27,000 --> 00:01:32,000 +If you want to perform task on the tab, we'll have to switch a window where there excuse. + +18 +00:01:32,000 --> 00:01:33,000 +I'm just logging out here. + +19 +00:01:36,000 --> 00:01:43,000 +So this is the scenario which I want to implement for that, first of all, I'm going to my project + +20 +00:01:43,000 --> 00:01:46,000 +and I'm going to create a new test case here. + +21 +00:01:46,000 --> 00:01:58,000 +So right click on the project new and I want to create a new test case just giving the name like Test + +22 +00:02:00,000 --> 00:02:08,000 +Multi Window and I'm going to use code, which I have written previously. + +23 +00:02:08,000 --> 00:02:10,000 +So just copy this code. + +24 +00:02:15,000 --> 00:02:15,000 +Going here. + +25 +00:02:18,000 --> 00:02:28,000 +I'm just removing the cord, which I don't want, like, I just want to go to my website and maximize + +26 +00:02:28,000 --> 00:02:28,000 +it. + +27 +00:02:30,000 --> 00:02:35,000 +So here there is a cord like we are moving to the website and maximize. + +28 +00:02:36,000 --> 00:02:41,000 +I don't want to go for any of these steps. + +29 +00:02:42,000 --> 00:02:44,000 +So just remove that. + +30 +00:02:45,000 --> 00:02:49,000 +No, we have to work on the different locator. + +31 +00:02:49,000 --> 00:02:51,000 +So first of all, I'm just coming to the application. + +32 +00:02:51,000 --> 00:02:53,000 +And first, I need to click on this log in. + +33 +00:02:54,000 --> 00:03:05,000 +So I'm finding out this login and here label where X is equal to logging something a driver dark find + +34 +00:03:05,000 --> 00:03:06,000 +element by x spot. + +35 +00:03:08,000 --> 00:03:20,000 +And here we have a label where text is equal to value, and I want to click on this next. + +36 +00:03:21,000 --> 00:03:23,000 +Once you click on, log in. + +37 +00:03:26,000 --> 00:03:33,000 +I need to enter username and password, so I just go there where name is equal to this so I can use. + +38 +00:03:33,000 --> 00:03:41,000 +I can look at it by the name drive, word dot, find element by name. + +39 +00:03:42,000 --> 00:03:52,000 +And I want to enter text here, so send keys best in the same way I'm going to use for the password. + +40 +00:03:52,000 --> 00:03:54,000 +So I'm just locating this password box. + +41 +00:03:58,000 --> 00:04:02,000 +Password is also located by name. + +42 +00:04:02,000 --> 00:04:03,000 +I'm going to look at the name. + +43 +00:04:04,000 --> 00:04:08,000 +Okay, then I want to click on the sign in button. + +44 +00:04:10,000 --> 00:04:14,000 +So again, more into the application that the login button. + +45 +00:04:16,000 --> 00:04:24,000 +Here we have type and value so I can generate a spot using the word dot. + +46 +00:04:27,000 --> 00:04:29,000 +Find element by export. + +47 +00:04:31,000 --> 00:04:36,000 +Input type is equal to. + +48 +00:04:37,000 --> 00:04:38,000 +Submit. + +49 +00:04:42,000 --> 00:04:44,000 +And we have seen these look at our techniques. + +50 +00:04:44,000 --> 00:04:46,000 +Value is equal to log in so well, you. + +51 +00:04:49,000 --> 00:04:51,000 +Is equal to log in. + +52 +00:04:52,000 --> 00:04:54,000 +And what I want to do, I just want to click on this. + +53 +00:04:55,000 --> 00:04:56,000 +So click next. + +54 +00:04:57,000 --> 00:05:03,000 +Once we log in, I just go and log in here. + +55 +00:05:06,000 --> 00:05:07,000 +Here we are on the next page. + +56 +00:05:11,000 --> 00:05:13,000 +I want to click on this, my account. + +57 +00:05:16,000 --> 00:05:25,000 +So it's a type of element, and we're our text contains my account. + +58 +00:05:25,000 --> 00:05:26,000 +OK. + +59 +00:05:27,000 --> 00:05:28,000 +I'm sitting here. + +60 +00:05:28,000 --> 00:05:34,000 +Try a word dot find element by x spot e. + +61 +00:05:37,000 --> 00:05:38,000 +Contains. + +62 +00:05:40,000 --> 00:05:41,000 +Text. + +63 +00:05:45,000 --> 00:05:49,000 +And these are they expected to export technique we have already seen previously, so I'm not focusing + +64 +00:05:49,000 --> 00:05:49,000 +on that. + +65 +00:05:50,000 --> 00:05:56,000 +You can use techniques which we have gone previously and the and once that is open, I want to click + +66 +00:05:56,000 --> 00:05:58,000 +on the update so that new tab will be open. + +67 +00:05:59,000 --> 00:06:02,000 +So it's again here with the inner text update. + +68 +00:06:03,000 --> 00:06:08,000 +OK, I just copy this line listed here. + +69 +00:06:10,000 --> 00:06:16,000 +Oh, so that's one test case we just prepared in which once we click on the update, a new page should + +70 +00:06:16,000 --> 00:06:17,000 +open. + +71 +00:06:18,000 --> 00:06:20,000 +So I'm executing here by test. + +72 +00:06:23,000 --> 00:06:23,000 +And. + +73 +00:06:24,000 --> 00:06:26,000 +Best underscore. + +74 +00:06:28,000 --> 00:06:39,000 +Multi do not be way this time it should open browser and do the task, which I already know what here + +75 +00:06:39,000 --> 00:06:44,000 +means it should once it will click on update, a new tab will open. + +76 +00:06:45,000 --> 00:06:48,000 +Let me show you let it let it execute, then I'll show you. + +77 +00:06:51,000 --> 00:06:54,000 +Maximized enter username password, click on the Sign button. + +78 +00:06:56,000 --> 00:06:58,000 +Then it is waiting for page to be. + +79 +00:06:59,000 --> 00:07:04,000 +And if you notice it, click on Update. + +80 +00:07:05,000 --> 00:07:07,000 +So a new tab gets open. + +81 +00:07:07,000 --> 00:07:11,000 +If you want to check, then I'll show you one more time here. + +82 +00:07:11,000 --> 00:07:13,000 +Hope you remember buying. + +83 +00:07:13,000 --> 00:07:17,000 +We can pause and we can check like we have imported time here. + +84 +00:07:18,000 --> 00:07:24,000 +So after click on the update, I want to show you like time dot sleep for 10 seconds. + +85 +00:07:26,000 --> 00:07:30,000 +Now executing one more thing, so you will notice two tabs open. + +86 +00:07:31,000 --> 00:07:37,000 +And from here, our task will be started where we are going to switch to the different tabs and perform + +87 +00:07:37,000 --> 00:07:38,000 +task. + +88 +00:07:40,000 --> 00:07:42,000 +Rosa started going to maximize. + +89 +00:07:46,000 --> 00:07:48,000 +And here, first of all, we are going for the logging. + +90 +00:07:49,000 --> 00:07:55,000 +Then it will click on update now two steps get open and you you'll notice I have made 10 second rate. + +91 +00:07:55,000 --> 00:07:56,000 +That's why it's on a wait. + +92 +00:07:58,000 --> 00:08:00,000 +So now we can start work on this. + +93 +00:08:00,000 --> 00:08:03,000 +Okay, I'll just close it manually. + +94 +00:08:04,000 --> 00:08:05,000 +No. + +95 +00:08:06,000 --> 00:08:07,000 +What any point of time? + +96 +00:08:08,000 --> 00:08:10,000 +Whatever the tabs or whatever the windows. + +97 +00:08:10,000 --> 00:08:17,000 +What are the pop ups, which are open by the very clever web browser assign a unique value. + +98 +00:08:17,000 --> 00:08:21,000 +We call it a window handler to each of the tab or each other pop. + +99 +00:08:22,000 --> 00:08:30,000 +If you want to switch to any tab or any popup, we have to find out that the unique value for finding + +100 +00:08:30,000 --> 00:08:35,000 +or the unique value we have the option dialer dot window handles. + +101 +00:08:36,000 --> 00:08:44,000 +So it's going to return a list with all window handler, all window handles. + +102 +00:08:44,000 --> 00:08:50,000 +So whatever the value is returned by this window handles, I'm distorting into the all windows. + +103 +00:08:51,000 --> 00:08:52,000 +No. + +104 +00:08:52,000 --> 00:09:01,000 +First of all, I just want to print all windows OK for running it. + +105 +00:09:01,000 --> 00:09:05,000 +Not by default, but this does not display anything here. + +106 +00:09:06,000 --> 00:09:08,000 +If it is related to the print statement. + +107 +00:09:08,000 --> 00:09:16,000 +But if you use Hyphen as means, it is going to display all the details, including print statement. + +108 +00:09:16,000 --> 00:09:18,000 +So now I'm executing it one more time. + +109 +00:09:18,000 --> 00:09:24,000 +This time it will fetch unique values from two tabs and display over here. + +110 +00:09:29,000 --> 00:09:31,000 +And now we are able to log in. + +111 +00:09:33,000 --> 00:09:34,000 +Now we have two tabs. + +112 +00:09:34,000 --> 00:09:41,000 +We have made it 10 second delay over there, so it's waiting for the 10 seconds and then we'll check + +113 +00:09:42,000 --> 00:09:45,000 +that unique value, some coming here. + +114 +00:09:45,000 --> 00:09:48,000 +If we check it, it's just two values here. + +115 +00:09:48,000 --> 00:09:51,000 +These are the two values which we call window handles. + +116 +00:09:51,000 --> 00:09:57,000 +So each tab, but each pop up, which is going to be opened by the web driver, will have this unique + +117 +00:09:57,000 --> 00:09:57,000 +value. + +118 +00:09:57,000 --> 00:10:03,000 +You know, by using this unique value, I can switch to the different window how we can go for that. + +119 +00:10:03,000 --> 00:10:07,000 +So I'm coming here and now I'm going to write code like. + +120 +00:10:10,000 --> 00:10:11,000 +For. + +121 +00:10:13,000 --> 00:10:13,000 +When? + +122 +00:10:14,000 --> 00:10:17,000 +In all windows, I'm running a loop. + +123 +00:10:19,000 --> 00:10:21,000 +No driver. + +124 +00:10:22,000 --> 00:10:27,000 +Dot switch to dot window. + +125 +00:10:28,000 --> 00:10:29,000 +Which window you want to switch. + +126 +00:10:29,000 --> 00:10:32,000 +So I'm just passing the unique handler here. + +127 +00:10:32,000 --> 00:10:34,000 +And now what I want to do. + +128 +00:10:34,000 --> 00:10:37,000 +Print driver dot. + +129 +00:10:39,000 --> 00:10:41,000 +Current EU order. + +130 +00:10:41,000 --> 00:10:48,000 +So what I'm doing, I'm running a loop, which will be ritual every time, pick a unique value, but + +131 +00:10:48,000 --> 00:10:51,000 +it's a window handler from this list. + +132 +00:10:51,000 --> 00:10:58,000 +Now after that, we are switching to that window, so switch to window and passing that unique handler + +133 +00:10:58,000 --> 00:10:58,000 +here. + +134 +00:10:59,000 --> 00:11:03,000 +So first time it will switch to the first step and we are picking that. + +135 +00:11:03,000 --> 00:11:04,000 +You are all of that. + +136 +00:11:04,000 --> 00:11:11,000 +So it will display that you are off first, then second time loop will, then it will switch to the + +137 +00:11:11,000 --> 00:11:15,000 +second tab, then it will pick that you are the second tab. + +138 +00:11:15,000 --> 00:11:24,000 +So as of now, I just want to show you we are able to switch to the different tabs and this approach + +139 +00:11:24,000 --> 00:11:27,000 +is going to work on the tabs as well as pop ups. + +140 +00:11:28,000 --> 00:11:34,000 +So let's execute, then I'll show you rather started going to be maximized. + +141 +00:11:35,000 --> 00:11:37,000 +Now log in. + +142 +00:11:40,000 --> 00:11:44,000 +Update, So now we have given the weight of 10 seconds. + +143 +00:11:46,000 --> 00:11:51,000 +And now I just come to my hair, it shows. + +144 +00:11:55,000 --> 00:11:56,000 +Do others? + +145 +00:11:58,000 --> 00:12:03,000 +No, the task I want to perform, I'm on a second window when I switch to the second window. + +146 +00:12:06,000 --> 00:12:10,000 +Like here, I want to click on the start download. + +147 +00:12:11,000 --> 00:12:12,000 +So first of all, I just want to look it. + +148 +00:12:14,000 --> 00:12:16,000 +It's a button with that text. + +149 +00:12:17,000 --> 00:12:21,000 +No, here I'm moving to the different windows. + +150 +00:12:23,000 --> 00:12:24,000 +I just want to check if. + +151 +00:12:26,000 --> 00:12:30,000 +Driver dot current you are. + +152 +00:12:31,000 --> 00:12:33,000 +If that is equal to. + +153 +00:12:35,000 --> 00:12:38,000 +This because now we are switching to the two different windows. + +154 +00:12:38,000 --> 00:12:40,000 +Oh, I cannot identify it. + +155 +00:12:40,000 --> 00:12:42,000 +I'm on a first B&B or second tab. + +156 +00:12:43,000 --> 00:12:44,000 +So we have to make something. + +157 +00:12:45,000 --> 00:12:50,000 +So I just copy the URL and pasted with you. + +158 +00:12:50,000 --> 00:12:59,000 +So I'm matching like, if that you are in this match means yes, I'm on a second window driver dot find + +159 +00:12:59,000 --> 00:13:03,000 +element, but spot button. + +160 +00:13:06,000 --> 00:13:10,000 +Where next is equal to. + +161 +00:13:10,000 --> 00:13:12,000 +And my next is. + +162 +00:13:13,000 --> 00:13:16,000 +Start, download, dot, click. + +163 +00:13:17,000 --> 00:13:25,000 +So I hope you understand I'm switching to the two different tabs, but I'm checking if I'm on a tab + +164 +00:13:25,000 --> 00:13:27,000 +with this others matching. + +165 +00:13:28,000 --> 00:13:35,000 +Then click on the start download, then wait for some time. + +166 +00:13:35,000 --> 00:13:36,000 +Dot sleep. + +167 +00:13:36,000 --> 00:13:41,000 +Wait for five seconds and then close that particular tab. + +168 +00:13:42,000 --> 00:13:47,000 +But once we close particular tab, that particular tab will be closed. + +169 +00:13:48,000 --> 00:14:05,000 +No, I'm just coming here, I'm saying Driver Dot Switch to Dark Window and I'm passing like when Ziegel. + +170 +00:14:08,000 --> 00:14:09,000 +Prior work thought. + +171 +00:14:12,000 --> 00:14:14,000 +Current, you are. + +172 +00:14:15,000 --> 00:14:16,000 +I'll explain what I'm doing here. + +173 +00:14:19,000 --> 00:14:21,000 +So I'll explain from here. + +174 +00:14:21,000 --> 00:14:26,000 +First of all, we are picking all the window handlers which are stored in this windows. + +175 +00:14:27,000 --> 00:14:28,000 +Now I'm running a loop. + +176 +00:14:29,000 --> 00:14:31,000 +First time it will switch to the first step. + +177 +00:14:31,000 --> 00:14:33,000 +Second time it will restore the second tip. + +178 +00:14:34,000 --> 00:14:40,000 +I don't know which is my current tip, but I'm checking if where? + +179 +00:14:40,000 --> 00:14:43,000 +What do you switch if the current you are a is like this? + +180 +00:14:44,000 --> 00:14:46,000 +Just find this element. + +181 +00:14:46,000 --> 00:14:47,000 +Click on. + +182 +00:14:47,000 --> 00:14:53,000 +That means if Mike guarantee you all is this, then find this element. + +183 +00:14:53,000 --> 00:14:53,000 +Click on it. + +184 +00:14:53,000 --> 00:14:56,000 +Now, wait for five seconds and then close the step. + +185 +00:14:57,000 --> 00:14:59,000 +So that is a task I have given there. + +186 +00:14:59,000 --> 00:15:01,000 +So start. + +187 +00:15:01,000 --> 00:15:02,000 +Download it for five. + +188 +00:15:02,000 --> 00:15:05,000 +Second clause means the second tab, which is open, is closed. + +189 +00:15:05,000 --> 00:15:08,000 +Now I'm switching back to the first tab. + +190 +00:15:08,000 --> 00:15:09,000 +How we can switch. + +191 +00:15:09,000 --> 00:15:16,000 +So I'm saying in this all windows on gyro index, do you have the first tab? + +192 +00:15:17,000 --> 00:15:20,000 +If you're not confirmed, you can again validate with the URL. + +193 +00:15:21,000 --> 00:15:22,000 +OK, how we can validate. + +194 +00:15:22,000 --> 00:15:23,000 +So. + +195 +00:15:25,000 --> 00:15:26,000 +I'm just coming here. + +196 +00:15:28,000 --> 00:15:35,000 +Else if and I'm writing the same code here. + +197 +00:15:39,000 --> 00:15:40,000 +I just copied it. + +198 +00:15:43,000 --> 00:15:45,000 +But this time, I want to match this. + +199 +00:15:47,000 --> 00:15:49,000 +And if that is true. + +200 +00:15:51,000 --> 00:15:52,000 +I'll explain this as well. + +201 +00:15:56,000 --> 00:16:00,000 +And this is not as if it's the elephant, because in Python, we have elephant. + +202 +00:16:01,000 --> 00:16:08,000 +I'm saying we have our very well mean win by default. + +203 +00:16:08,000 --> 00:16:09,000 +There is nothing in that. + +204 +00:16:10,000 --> 00:16:15,000 +So I'm saying men win is equal to win. + +205 +00:16:17,000 --> 00:16:19,000 +So and here I'm writing. + +206 +00:16:21,000 --> 00:16:23,000 +So now, listen, I'll explain one more thing. + +207 +00:16:24,000 --> 00:16:27,000 +First of all, again, we are picking all the window handlers. + +208 +00:16:27,000 --> 00:16:29,000 +It is running a loop now. + +209 +00:16:30,000 --> 00:16:31,000 +It is switching to the different tabs. + +210 +00:16:32,000 --> 00:16:38,000 +If there is matching with this, that's my main window, which is open after logging. + +211 +00:16:39,000 --> 00:16:46,000 +If that is whatever the window handler just brought into another variable, which is main when men win. + +212 +00:16:46,000 --> 00:16:52,000 +If that you are matching, then again, click on the download button, sleep and close it. + +213 +00:16:53,000 --> 00:16:57,000 +So no second tab, which is open, will be closed after this loop. + +214 +00:16:58,000 --> 00:17:00,000 +I want to switch back to the first tab. + +215 +00:17:01,000 --> 00:17:11,000 +So I just Bossert here mean well, because what first tab, whatever the window and that are stored + +216 +00:17:11,000 --> 00:17:11,000 +into that men? + +217 +00:17:12,000 --> 00:17:16,000 +So and once you switch to the first tab again, show me the URL. + +218 +00:17:17,000 --> 00:17:17,000 +Everything is done. + +219 +00:17:18,000 --> 00:17:19,000 +I'm just running it. + +220 +00:17:21,000 --> 00:17:21,000 +You will notice. + +221 +00:17:23,000 --> 00:17:32,000 +Second, Tab Will Open, will perform the task, will close it and switch back to the first web browser + +222 +00:17:32,000 --> 00:17:32,000 +started. + +223 +00:17:36,000 --> 00:17:37,000 +Going for logging. + +224 +00:17:39,000 --> 00:17:44,000 +And now it is waiting for 10 seconds. + +225 +00:17:47,000 --> 00:17:51,000 +After ten second, it will click on Start Download. + +226 +00:17:55,000 --> 00:18:02,000 +And then close it, so everything is and at the end it is picking this main window, you are. + +227 +00:18:04,000 --> 00:18:10,000 +So have you seen how we can switch to the different depths and this approach is going to work on the + +228 +00:18:10,000 --> 00:18:12,000 +taps and the pop ups? + +229 +00:18:12,000 --> 00:18:14,000 +So same approach will work on it, ebb and pop up. + +230 +00:18:17,000 --> 00:18:22,000 +You will notice here that the way to perform tasks on the different buttons textbooks is same. + +231 +00:18:22,000 --> 00:18:29,000 +Defense is that only we need to switch control control to the different tabs or pop up and that we have + +232 +00:18:29,000 --> 00:18:32,000 +seen here we can switch that control by using window little. + +233 +00:18:34,000 --> 00:18:37,000 +So here in the session, we have seen how we can perform multi-window handling. + +234 +00:18:38,000 --> 00:18:42,000 +That's all we have for the session tanks watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/006 Page Object Model (POM)& Its Advantages_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/006 Page Object Model (POM)& Its Advantages_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..370f081922be942dddea55340ea28907ceba1254 --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/006 Page Object Model (POM)& Its Advantages_en.srt @@ -0,0 +1,236 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +So previously, we have seen how we can write best cases using selenium and Python. + +3 +00:00:09,000 --> 00:00:13,000 +We have seen by test, we have seen how we can work on a different type of elements. + +4 +00:00:13,000 --> 00:00:19,000 +Now I'm coming to one of the most important concept, which is bomb bage object model. + +5 +00:00:20,000 --> 00:00:26,000 +The bomb itself is not a framework, but it is going to be used in the frameworks. + +6 +00:00:27,000 --> 00:00:32,000 +So first of all, we need to understand bomb and how we can implement bomb in our frameworks. + +7 +00:00:33,000 --> 00:00:38,000 +So bomb, is it architecture style or we can call it design pattern. + +8 +00:00:38,000 --> 00:00:43,000 +If you follow the bomb design pattern, we are going to get a lot of advantages. + +9 +00:00:44,000 --> 00:00:51,000 +So first of all, we need to say we need to understand what bombs these bombs is whenever we are going + +10 +00:00:51,000 --> 00:00:51,000 +for automation. + +11 +00:00:51,000 --> 00:00:57,000 +Automating any web based application, we need to check how many pages we are having on the application. + +12 +00:00:58,000 --> 00:01:02,000 +I take an example like I'm working on an application where we have 20 pages. + +13 +00:01:03,000 --> 00:01:08,000 +So no bombs is create a separate class for each of the page. + +14 +00:01:09,000 --> 00:01:13,000 +So if we have 20 pages, I'll have to create 20 separate classes. + +15 +00:01:15,000 --> 00:01:20,000 +Then what all that do you want to do on the pages? + +16 +00:01:21,000 --> 00:01:26,000 +For each activity, we need to create a method like if I take an example, I have a log in page. + +17 +00:01:26,000 --> 00:01:32,000 +So first of all, we need to create a separate class with the name log in page what all that you do + +18 +00:01:32,000 --> 00:01:33,000 +want to perform on the login page. + +19 +00:01:33,000 --> 00:01:34,000 +So I want to enter username. + +20 +00:01:34,000 --> 00:01:35,000 +I want to enter password. + +21 +00:01:36,000 --> 00:01:37,000 +I want to click Sign In Button. + +22 +00:01:37,000 --> 00:01:41,000 +So what all the activities you want to perform create a separate method for that. + +23 +00:01:42,000 --> 00:01:49,000 +So I'm going to create three methods inside this class and order for performing the action on the different + +24 +00:01:49,000 --> 00:01:51,000 +elements like I want to enter username. + +25 +00:01:52,000 --> 00:01:54,000 +I have one line of code for that. + +26 +00:01:54,000 --> 00:02:01,000 +Rather than writing the code on the test case right in the method which you created on the page glass. + +27 +00:02:02,000 --> 00:02:03,000 +So advantage would be. + +28 +00:02:05,000 --> 00:02:10,000 +Once we complete all the pages means all the activities we can perform on the different browsers. + +29 +00:02:11,000 --> 00:02:15,000 +We have written the code for that, knowing that we are going to call that code. + +30 +00:02:16,000 --> 00:02:21,000 +So in the next session, I'll show you how we can implement that way of implementation in form. + +31 +00:02:21,000 --> 00:02:27,000 +Now what I had wanted is we are going to get because we are writing code on the page level. + +32 +00:02:28,000 --> 00:02:33,000 +And if we require the code in the 10 different desk guesses, we're not writing it again and again, + +33 +00:02:33,000 --> 00:02:35,000 +we're calling the same code. + +34 +00:02:35,000 --> 00:02:39,000 +So it is removing or minimizing duplication of the code. + +35 +00:02:40,000 --> 00:02:44,000 +Second, reduce development efforts, how agape. + +36 +00:02:44,000 --> 00:02:50,000 +I have a scenario in which I need to automate logging and log out my teammate has a scenario in which + +37 +00:02:50,000 --> 00:02:53,000 +he won't automate logging, send email and log out. + +38 +00:02:54,000 --> 00:03:00,000 +If I could hear a lot of steps are common to these discuses if you don't follow them. + +39 +00:03:00,000 --> 00:03:01,000 +I write my steps. + +40 +00:03:01,000 --> 00:03:03,000 +He'll write his own steps. + +41 +00:03:03,000 --> 00:03:05,000 +I'll have to find my own locator. + +42 +00:03:05,000 --> 00:03:07,000 +I hope to find my locators. + +43 +00:03:07,000 --> 00:03:13,000 +He will have to find out his own locators, so it will take extra time. + +44 +00:03:13,000 --> 00:03:20,000 +But if you create pages, so all the locators, all the line of code are written on one place only and + +45 +00:03:20,000 --> 00:03:24,000 +other personnel are just calling it so intimately it is reducing development efforts. + +46 +00:03:26,000 --> 00:03:32,000 +Also, trade develop development time because it is taking less efforts. + +47 +00:03:32,000 --> 00:03:39,000 +So ultimately, we can do it fast, reduce maintenance efforts on time, that's most important. + +48 +00:03:39,000 --> 00:03:45,000 +We have implemented bomb and later on we want to make some changes on something on the login page. + +49 +00:03:45,000 --> 00:03:48,000 +So we need to go to the test level each and every day. + +50 +00:03:49,000 --> 00:03:50,000 +We'll just go to the page. + +51 +00:03:50,000 --> 00:03:51,000 +Make changes over there. + +52 +00:03:51,000 --> 00:03:55,000 +So on one place, changes will be reflected in all these cases. + +53 +00:03:55,000 --> 00:03:58,000 +So it's going to reduce mental statement efforts. + +54 +00:04:00,000 --> 00:04:06,000 +It increase the usability and reliability of the code means, think what we are going through the user + +55 +00:04:06,000 --> 00:04:12,000 +giving against answers, including the usability reliability once we when we are writing discuses, + +56 +00:04:12,000 --> 00:04:14,000 +it will be very easy to understand these discourses. + +57 +00:04:15,000 --> 00:04:19,000 +So next session, we will implement that and will check all these advantages. + +58 +00:04:21,000 --> 00:04:22,000 +That's all we have for the session. + +59 +00:04:23,000 --> 00:04:24,000 +Thanks watching this video. + diff --git a/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/007 Implement POM in Realtime Automation Project_en.srt b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/007 Implement POM in Realtime Automation Project_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..cdc316614635474d44144ec4aacc2e262fe8a6ff --- /dev/null +++ b/38 - Formatted Project Structure Define Folder Hierarchy for Automation Projects/007 Implement POM in Realtime Automation Project_en.srt @@ -0,0 +1,624 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:02,000 --> 00:00:07,000 +So previously we have seen what do you mean with the bomb and what all the advantages we are going to + +3 +00:00:07,000 --> 00:00:15,000 +get with Bomb, which is pitch object model now show you how we can implement bomb in cleanly with Python. + +4 +00:00:16,000 --> 00:00:18,000 +So I'm just moving to the project that we have created previously. + +5 +00:00:19,000 --> 00:00:26,000 +And if you understand the reason of the bombs, if you notice we have to test this and it might be possible, + +6 +00:00:26,000 --> 00:00:29,000 +we have many lines which are common between these two test cases. + +7 +00:00:29,000 --> 00:00:36,000 +As of now, we only to test kits, but we test kits and there are many situations when we're using seam, + +8 +00:00:36,000 --> 00:00:44,000 +when we are having same code, same line of code in multiple test cases and in future, if that code + +9 +00:00:44,000 --> 00:00:48,000 +is going to be changed for whatever the reason, we have to go to the each and every test kit and make + +10 +00:00:48,000 --> 00:00:48,000 +changes. + +11 +00:00:49,000 --> 00:00:56,000 +But the best approach is that we implement the bomb structure in bomb for all the pages we're having + +12 +00:00:56,000 --> 00:00:57,000 +in that application. + +13 +00:00:57,000 --> 00:01:00,000 +We need to create a separate class for that. + +14 +00:01:00,000 --> 00:01:05,000 +So I'm just coming here in the pages and new and python file. + +15 +00:01:05,000 --> 00:01:07,000 +I'm just giving the name like registration. + +16 +00:01:10,000 --> 00:01:16,000 +Beach inside the registration page, I'm creating a class like registration. + +17 +00:01:19,000 --> 00:01:24,000 +Plus, you can give any name, I'm just giving the registration class, know what all the duties you + +18 +00:01:24,000 --> 00:01:27,000 +want to perform on this bit on the registration page. + +19 +00:01:27,000 --> 00:01:29,000 +We need to create a method for that. + +20 +00:01:29,000 --> 00:01:34,000 +If you notice in my application, in our application, we can perform. + +21 +00:01:35,000 --> 00:01:38,000 +We can perform a lot of activities on the page like I can enter username. + +22 +00:01:38,000 --> 00:01:41,000 +I can enter passwords, email, confirm password. + +23 +00:01:41,000 --> 00:01:44,000 +We can select address type. + +24 +00:01:44,000 --> 00:01:45,000 +We can select dropdown. + +25 +00:01:45,000 --> 00:01:49,000 +So we need to create one method for each activity. + +26 +00:01:49,000 --> 00:01:58,000 +So I'm just going there and like, I'm going to create a method like def and their username and. + +27 +00:02:00,000 --> 00:02:02,000 +Whatever the username you want to enter. + +28 +00:02:02,000 --> 00:02:05,000 +I'm just asking for you to send your username. + +29 +00:02:05,000 --> 00:02:06,000 +OK? + +30 +00:02:06,000 --> 00:02:12,000 +And in the same way I can create and whatever the code for the username. + +31 +00:02:12,000 --> 00:02:20,000 +So if you notice there is a code for entering the username, I'm just listing over here in the same + +32 +00:02:20,000 --> 00:02:23,000 +way you can create any number of methods. + +33 +00:02:27,000 --> 00:02:37,000 +Like, I just copied it, and I'm creating a method for anther password. + +34 +00:02:41,000 --> 00:02:49,000 +In the same way, I'm writing the code like and the email so we can provide a method for each and every + +35 +00:02:49,000 --> 00:02:53,000 +task which you want to perform on that particular page. + +36 +00:02:54,000 --> 00:02:58,000 +And here these lines will be changed because that is for the user name. + +37 +00:02:59,000 --> 00:03:02,000 +I'm just going here, that is for e-mail. + +38 +00:03:02,000 --> 00:03:13,000 +So cut and go to that page, that is for e-mail in the same way. + +39 +00:03:13,000 --> 00:03:15,000 +For password, I'm coming here. + +40 +00:03:16,000 --> 00:03:21,000 +Just cut it and using here. + +41 +00:03:22,000 --> 00:03:28,000 +So we are writing a line of code for each of the tasks you want to perform on that page. + +42 +00:03:29,000 --> 00:03:31,000 +Now we are getting some error here. + +43 +00:03:31,000 --> 00:03:35,000 +We'll sort out these error first config parser. + +44 +00:03:35,000 --> 00:03:37,000 +We did not imported here. + +45 +00:03:37,000 --> 00:03:39,000 +So first of all, we need to import like from. + +46 +00:03:42,000 --> 00:03:47,000 +Library import configurator. + +47 +00:03:48,000 --> 00:03:57,000 +Dresden also is asking for a driver object because this method is going to work on the browser and that + +48 +00:03:57,000 --> 00:04:00,000 +browser will be open when we created the driver object. + +49 +00:04:01,000 --> 00:04:02,000 +So how you can fetch it? + +50 +00:04:03,000 --> 00:04:05,000 +What I can do, I'll create a contractor here. + +51 +00:04:05,000 --> 00:04:11,000 +So hope you remember how we can create constructor because whenever somebody want to call this, these + +52 +00:04:11,000 --> 00:04:13,000 +method will have to create object of this class. + +53 +00:04:14,000 --> 00:04:25,000 +So what we are doing whenever somebody create object of this blast, just bus driver object and I'm + +54 +00:04:25,000 --> 00:04:28,000 +riding like global driver. + +55 +00:04:29,000 --> 00:04:31,000 +So I'm creating a driver object, which is global. + +56 +00:04:32,000 --> 00:04:34,000 +Driver is equal to object. + +57 +00:04:34,000 --> 00:04:40,000 +So what I'm doing here, when somebody is going to call these methods. + +58 +00:04:40,000 --> 00:04:45,000 +First of all, will have to create object of this class when we are carrying object of the class, constructor + +59 +00:04:45,000 --> 00:04:46,000 +execute. + +60 +00:04:46,000 --> 00:04:48,000 +So I'm asking, send me the driver object. + +61 +00:04:49,000 --> 00:04:56,000 +So this constructor will set this driver object to the driver and this driver is global means it can + +62 +00:04:56,000 --> 00:04:58,000 +be used anywhere in the page. + +63 +00:05:00,000 --> 00:05:07,000 +Also, as of now, we are putting hello here rather than hello, I'm using whatever the data you've + +64 +00:05:07,000 --> 00:05:07,000 +passed me. + +65 +00:05:07,000 --> 00:05:15,000 +So if you pass me user name, I said to do it here in the same password, I'm setting password here + +66 +00:05:17,000 --> 00:05:21,000 +in the same way you are sending me email, so I'm sending email here. + +67 +00:05:23,000 --> 00:05:25,000 +So what are the data will be sent? + +68 +00:05:25,000 --> 00:05:26,000 +I'll use it over here. + +69 +00:05:27,000 --> 00:05:33,000 +So now a page is created in which we are performing three actions in the three different methods. + +70 +00:05:33,000 --> 00:05:35,000 +You can create a number of methods. + +71 +00:05:36,000 --> 00:05:40,000 +You can create all the methods for all the tasks you want to perform on this page. + +72 +00:05:41,000 --> 00:05:45,000 +Now, show you how we can use this in our test scores. + +73 +00:05:46,000 --> 00:05:47,000 +I'm just moving to the test case. + +74 +00:05:48,000 --> 00:05:51,000 +First of all, here, browser will be started. + +75 +00:05:52,000 --> 00:05:54,000 +I want to enter some data. + +76 +00:05:54,000 --> 00:05:58,000 +So what I'm going to do, I'm saying I want to work on the registration page. + +77 +00:05:58,000 --> 00:06:00,000 +So first of all, I need to import it. + +78 +00:06:01,000 --> 00:06:07,000 +But we remember that for importing, we need to create init file. + +79 +00:06:08,000 --> 00:06:16,000 +So init peewee, which will be displayed just directly as a package, as it module. + +80 +00:06:16,000 --> 00:06:21,000 +So I'm writing like from Dot Import Registration page. + +81 +00:06:22,000 --> 00:06:25,000 +Now I can use this directory in our discuses. + +82 +00:06:26,000 --> 00:06:35,000 +So I'm just moving to the test cases and I'm writing like from Page's import registration page. + +83 +00:06:36,000 --> 00:06:39,000 +No, I need to create object of the class which is placed in this file. + +84 +00:06:39,000 --> 00:06:44,000 +So I'm saying the register is equal to. + +85 +00:06:47,000 --> 00:06:51,000 +And my class name is registration page. + +86 +00:06:51,000 --> 00:06:52,000 +We need to pass driver objects. + +87 +00:06:52,000 --> 00:06:56,000 +I'm passing it here because hope you remember on the registration page. + +88 +00:06:59,000 --> 00:07:05,000 +We need to pass driver object to the constructor, and that object will be used on this complete page. + +89 +00:07:05,000 --> 00:07:09,000 +So I'm passing it here now. + +90 +00:07:09,000 --> 00:07:13,000 +We can call all the methods like I want to enter username name, so I'm just calling the method directly + +91 +00:07:15,000 --> 00:07:16,000 +and user name. + +92 +00:07:18,000 --> 00:07:19,000 +What are you? + +93 +00:07:19,000 --> 00:07:20,000 +The name you want to enter? + +94 +00:07:20,000 --> 00:07:20,000 +I want to enter. + +95 +00:07:21,000 --> 00:07:22,000 +Hello. + +96 +00:07:22,000 --> 00:07:28,000 +In the same way, I'm saying the register dot and the password. + +97 +00:07:29,000 --> 00:07:31,000 +So I'm just going there. + +98 +00:07:31,000 --> 00:07:33,000 +I'm calling the method enter password. + +99 +00:07:34,000 --> 00:07:37,000 +So now all the methods are created on the pages. + +100 +00:07:38,000 --> 00:07:41,000 +I'm just calling this method wherever required. + +101 +00:07:41,000 --> 00:07:47,000 +So as of now, we have made changes in one to shift four and before execution. + +102 +00:07:48,000 --> 00:07:52,000 +One minor mistake that I've done is that we need to create object of the class. + +103 +00:07:52,000 --> 00:07:56,000 +I'm just passing registration page and then class object. + +104 +00:07:56,000 --> 00:08:00,000 +So everything is done because we need to create object the class to package name, dark class name. + +105 +00:08:01,000 --> 00:08:07,000 +Now, if I try to execute and I try to execute now. + +106 +00:08:07,000 --> 00:08:08,000 +So by default. + +107 +00:08:10,000 --> 00:08:18,000 +So if it is executed successfully means we are able to call methods which are based on pages. + +108 +00:08:25,000 --> 00:08:31,000 +So here it is, entering data means, yes, we are able to call these methods successfully. + +109 +00:08:34,000 --> 00:08:41,000 +Here we have seen we are implementing Bomb, which is page model in page object model, whatever the + +110 +00:08:41,000 --> 00:08:44,000 +number of pages we are having in the application, create a page for that I have created. + +111 +00:08:44,000 --> 00:08:47,000 +First of all, I have gone to pages. + +112 +00:08:47,000 --> 00:08:54,000 +I created a Python file in that we have created a class registration class and whatnot that could be + +113 +00:08:54,000 --> 00:08:56,000 +if you want to perform, just great method for that. + +114 +00:08:57,000 --> 00:09:01,000 +And this code, which we are writing and the task is not right. + +115 +00:09:01,000 --> 00:09:05,000 +Write it in two methods in this class method. + +116 +00:09:06,000 --> 00:09:08,000 +Also, we need to create a constructor. + +117 +00:09:08,000 --> 00:09:12,000 +I'm creating a constructor because to perform this task, we need a driver object. + +118 +00:09:13,000 --> 00:09:18,000 +So rather than passing the driver object to each of the method, I'm just passing it to the constructor + +119 +00:09:18,000 --> 00:09:20,000 +constructor, setting it the global. + +120 +00:09:20,000 --> 00:09:23,000 +Now it can be used anywhere on the page. + +121 +00:09:24,000 --> 00:09:27,000 +As of now, we have created only three methods you can create. + +122 +00:09:27,000 --> 00:09:31,000 +Any number of method depend on what all the activities you want to perform on this page. + +123 +00:09:32,000 --> 00:09:38,000 +Then we know if you want to use this Pages Pages folder as a module on the other places we need to create + +124 +00:09:38,000 --> 00:09:39,000 +in it file. + +125 +00:09:39,000 --> 00:09:40,000 +So I just do that. + +126 +00:09:41,000 --> 00:09:50,000 +Now on the task force level, moving to the discuses on the test level. + +127 +00:09:51,000 --> 00:09:56,000 +First of all, I have imported that and then we need to create objeot of the class. + +128 +00:09:56,000 --> 00:09:58,000 +So that is a package inside that we have a class. + +129 +00:09:58,000 --> 00:10:02,000 +We have created object of that while creating object and passing the driver object. + +130 +00:10:02,000 --> 00:10:08,000 +Because you remember while creating object data, the constructor which is asking for the object, I + +131 +00:10:08,000 --> 00:10:08,000 +would object. + +132 +00:10:09,000 --> 00:10:12,000 +So I passed it, and now we are calling this method. + +133 +00:10:13,000 --> 00:10:14,000 +So here we have multiple advantages. + +134 +00:10:14,000 --> 00:10:15,000 +One. + +135 +00:10:15,000 --> 00:10:20,000 +Now all the test cases which want to perform registration tasks they are not going to write on. + +136 +00:10:21,000 --> 00:10:24,000 +They are going to call the same code, which is written on the register page. + +137 +00:10:24,000 --> 00:10:31,000 +That is one second advantage we are going to get if in future anything got changed on the page. + +138 +00:10:31,000 --> 00:10:34,000 +So there is no duplicate in no second advantage. + +139 +00:10:35,000 --> 00:10:37,000 +If there is the changes we need to make. + +140 +00:10:38,000 --> 00:10:43,000 +So we need to make on the test scores level will go to the page and we'll make changes whatever required. + +141 +00:10:44,000 --> 00:10:45,000 +Third. + +142 +00:10:45,000 --> 00:10:48,000 +Now it is very easy to understand what user is doing. + +143 +00:10:49,000 --> 00:10:51,000 +It is simple English former test kit. + +144 +00:10:51,000 --> 00:10:54,000 +Now we are entering username, we are entering password. + +145 +00:10:54,000 --> 00:10:55,000 +So anybody can understand. + +146 +00:10:55,000 --> 00:11:00,000 +This test gives forth the skills development and skills maintenance time. + +147 +00:11:00,000 --> 00:11:07,000 +Reduce because if somebody create this pages now as a desk designer, we just need to call these methods + +148 +00:11:07,000 --> 00:11:11,000 +it reduce the time of their skills development. + +149 +00:11:11,000 --> 00:11:14,000 +And that's the structure we have created by using bomb. + +150 +00:11:15,000 --> 00:11:17,000 +So we have a lot of advantages. + +151 +00:11:17,000 --> 00:11:20,000 +As of now, I have created only one page with a few methods. + +152 +00:11:21,000 --> 00:11:26,000 +You can create you can create many pages with different methods, and we required just great object + +153 +00:11:26,000 --> 00:11:28,000 +of the class and college methods. + +154 +00:11:30,000 --> 00:11:35,000 +So here we have seen how we can implement bomb installation with Python. + +155 +00:11:36,000 --> 00:11:37,000 +That's all we have. + +156 +00:11:37,000 --> 00:11:38,000 +Thanks for watching this video. + diff --git a/39 - FRAMEWORK DESIGNING Data Driven Testing Framework/001 Data Driven Testing with static data_en.srt b/39 - FRAMEWORK DESIGNING Data Driven Testing Framework/001 Data Driven Testing with static data_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..13306d4e1eae80c1889b2147ccfd545c749fa80f --- /dev/null +++ b/39 - FRAMEWORK DESIGNING Data Driven Testing Framework/001 Data Driven Testing with static data_en.srt @@ -0,0 +1,464 @@ +1 +00:00:00,000 --> 00:00:07,000 +Welcome to the artistic world in this session, I'll show you how we can implement data driven framework, + +2 +00:00:08,000 --> 00:00:13,000 +or we can call it data driven testing in selenium, Biton discuses. + +3 +00:00:14,000 --> 00:00:17,000 +So first of all, we need to understand what do you mean by the data driven? + +4 +00:00:17,000 --> 00:00:20,000 +And then I'll show you how we can implement it. + +5 +00:00:21,000 --> 00:00:22,000 +I moved to the men we're testing first. + +6 +00:00:23,000 --> 00:00:25,000 +Whenever we are going for the men were testing. + +7 +00:00:25,000 --> 00:00:30,000 +It might be a situation when we are testing the same scenario with a different set of test data. + +8 +00:00:31,000 --> 00:00:34,000 +Some could be positive data and some could be negative data. + +9 +00:00:34,000 --> 00:00:38,000 +But in many cases we are going to test replication with a multiple set of this data. + +10 +00:00:39,000 --> 00:00:47,000 +Let me open our application and here also that the registration form and we can test this logistician + +11 +00:00:47,000 --> 00:00:55,000 +form with a different set of test data like sometimes I'm taking the same password in the negative scenario. + +12 +00:00:55,000 --> 00:00:59,000 +I'm taking password and confirm password is different. + +13 +00:00:59,000 --> 00:01:02,000 +In some cases, I'm using duplicate immolate. + +14 +00:01:02,000 --> 00:01:05,000 +In some cases I try to use duplicate username. + +15 +00:01:05,000 --> 00:01:12,000 +We can have a different set of data by which we are going to test this application in manual testing. + +16 +00:01:12,000 --> 00:01:18,000 +Normally, we are creating a different this case with each of the data, like if I have five set of + +17 +00:01:18,000 --> 00:01:18,000 +test data. + +18 +00:01:19,000 --> 00:01:25,000 +In men, we're testing, we are getting five test cases, but in automation we are not following this + +19 +00:01:25,000 --> 00:01:26,000 +approach. + +20 +00:01:26,000 --> 00:01:32,000 +In automation, my test kit will be one which is going to execute with the five different set of test + +21 +00:01:32,000 --> 00:01:36,000 +data or if we have 100 different set of test data. + +22 +00:01:36,000 --> 00:01:42,000 +So same task is going to execute 100 times with different data here. + +23 +00:01:42,000 --> 00:01:47,000 +Data driven means my best guess is going to drive from the data. + +24 +00:01:48,000 --> 00:01:51,000 +So if we have 100 data, it's going to execute 100 times. + +25 +00:01:51,000 --> 00:01:56,000 +If you have 10000 data, it's going to execute 10000 times data driven testing. + +26 +00:01:57,000 --> 00:02:01,000 +Now we got understanding what do you mean with the data driven testing in data driven testing, we're + +27 +00:02:01,000 --> 00:02:06,000 +going to test simple test kits with a different set of test data. + +28 +00:02:06,000 --> 00:02:13,000 +Now this data, or it's a different data, you can place that in the theissue file in Excel, file in + +29 +00:02:13,000 --> 00:02:13,000 +database. + +30 +00:02:13,000 --> 00:02:20,000 +If we can pick this data from different sources in this video, I'm going to use Excel as a data source. + +31 +00:02:21,000 --> 00:02:26,000 +First of all, I'm just moving to my project that we have created in the previous session. + +32 +00:02:26,000 --> 00:02:29,000 +I'm just going to explain it here. + +33 +00:02:29,000 --> 00:02:31,000 +We have divided our complete project into different files. + +34 +00:02:32,000 --> 00:02:36,000 +Like here we have initial driver where we are defining the driver. + +35 +00:02:36,000 --> 00:02:40,000 +We are creating driver object and we are closing browser. + +36 +00:02:40,000 --> 00:02:41,000 +Previously we have seen how we can develop this. + +37 +00:02:42,000 --> 00:02:46,000 +If you did not cover the previous video, I would suggest to go for the previous video first and then + +38 +00:02:46,000 --> 00:02:48,000 +it will be easy for you to understand. + +39 +00:02:49,000 --> 00:02:56,000 +To work on the current video, then we have configuration file where we mentioned like on which you + +40 +00:02:56,000 --> 00:02:59,000 +are, you want to test and the browser you want to test. + +41 +00:02:59,000 --> 00:03:07,000 +We have element locator file in the same way I have driver easy placed in the in this driver folder. + +42 +00:03:07,000 --> 00:03:09,000 +We have library files. + +43 +00:03:09,000 --> 00:03:11,000 +Here we have configurator means. + +44 +00:03:11,000 --> 00:03:13,000 +We are reading the data from config files. + +45 +00:03:14,000 --> 00:03:15,000 +Then we have pages. + +46 +00:03:15,000 --> 00:03:22,000 +We implemented the bomb and then we have discuses I'm going to come here on the discuses. + +47 +00:03:23,000 --> 00:03:28,000 +As of now, my test case is executing with a single set of test data, which you mentioned over here. + +48 +00:03:29,000 --> 00:03:33,000 +Now I want to convert this test case into data driven format. + +49 +00:03:33,000 --> 00:03:37,000 +I'm just coming here and I'm going to use I'm using byte test here. + +50 +00:03:38,000 --> 00:03:42,000 +So first of all, I'm going to create a method which is going to generate test data for me. + +51 +00:03:43,000 --> 00:03:48,000 +So I'm saying bef, I'm saying data generator. + +52 +00:03:48,000 --> 00:03:52,000 +I've just given the name of the method is data generated here. + +53 +00:03:52,000 --> 00:03:59,000 +First of all, I'll create I'll write some static data and going to use in my test case, then I'll + +54 +00:03:59,000 --> 00:04:06,000 +pick data from the Excel and going to using the disk, you know, for executing ATA skills with a different + +55 +00:04:06,000 --> 00:04:07,000 +set of data. + +56 +00:04:07,000 --> 00:04:10,000 +We need to create a nested list. + +57 +00:04:10,000 --> 00:04:16,000 +Nested list list means I have a list like L.A. inside the list. + +58 +00:04:17,000 --> 00:04:22,000 +All the data is again in the form of list, so I'm saying that's my list. + +59 +00:04:23,000 --> 00:04:24,000 +Inside the list. + +60 +00:04:24,000 --> 00:04:28,000 +First data itself is a list where we are defining Lake, you name. + +61 +00:04:32,000 --> 00:04:35,000 +You name one and. + +62 +00:04:36,000 --> 00:04:39,000 +Pass one. + +63 +00:04:39,000 --> 00:04:40,000 +So if you notice. + +64 +00:04:43,000 --> 00:04:47,000 +We have a list and inside that each item itself is a list. + +65 +00:04:48,000 --> 00:04:50,000 +So now I'm clearing nested list. + +66 +00:04:50,000 --> 00:04:55,000 +So now I'm just defining three data username to. + +67 +00:04:57,000 --> 00:05:02,000 +Password two user name, three password, three. + +68 +00:05:04,000 --> 00:05:10,000 +I have a list inside that we have three items and each item itself is a list. + +69 +00:05:11,000 --> 00:05:15,000 +No, we need to return this list. + +70 +00:05:15,000 --> 00:05:16,000 +Something return. + +71 +00:05:20,000 --> 00:05:27,000 +And I want to return this list first task is to create a two dimensional list in which all the data + +72 +00:05:27,000 --> 00:05:28,000 +is placed. + +73 +00:05:29,000 --> 00:05:37,000 +No, I'm just coming to my desk, which we want to execute with a different set of data. + +74 +00:05:37,000 --> 00:05:42,000 +And here I need to use by despite test for that. + +75 +00:05:42,000 --> 00:05:44,000 +I'm just importing by test. + +76 +00:05:44,000 --> 00:05:49,000 +So import by test it. + +77 +00:05:49,000 --> 00:05:57,000 +I'm using like byte test dot mark dot barometer mid-race. + +78 +00:06:02,000 --> 00:06:10,000 +And here we need to define a variable something variable limited data. + +79 +00:06:10,000 --> 00:06:12,000 +And now from where we are picking the data. + +80 +00:06:12,000 --> 00:06:14,000 +So I'm picking data from data generator. + +81 +00:06:16,000 --> 00:06:19,000 +So whatever the data which is coming from this data generator. + +82 +00:06:21,000 --> 00:06:27,000 +So first time it will send first value, which is again a list which will be stored in this data. + +83 +00:06:28,000 --> 00:06:33,000 +So here I want to use data zero. + +84 +00:06:35,000 --> 00:06:41,000 +And then data one, I'll explain one more time, just data. + +85 +00:06:43,000 --> 00:06:43,000 +One. + +86 +00:06:44,000 --> 00:06:53,000 +And also here we need to define this method is going to work on the data which is coming from data generator. + +87 +00:06:55,000 --> 00:06:56,000 +I'll explain it one more time. + +88 +00:06:58,000 --> 00:07:00,000 +First of all, this data generator is going to execute. + +89 +00:07:01,000 --> 00:07:05,000 +It will send one item at a time. + +90 +00:07:05,000 --> 00:07:12,000 +So item itself is a list which will transfer to this desk is whatever the data which is coming. + +91 +00:07:12,000 --> 00:07:15,000 +I'm just talking to the data available and passing to this method. + +92 +00:07:15,000 --> 00:07:17,000 +So here we passed now. + +93 +00:07:17,000 --> 00:07:25,000 +This data itself is a list because from here a list is coming, which is storing in this data. + +94 +00:07:25,000 --> 00:07:27,000 +So data itself, is it list? + +95 +00:07:28,000 --> 00:07:30,000 +So first of all, you have the list I have placed here. + +96 +00:07:30,000 --> 00:07:32,000 +Second, value of the list, I hope list here. + +97 +00:07:34,000 --> 00:07:37,000 +Everything seems to be OK now to execute. + +98 +00:07:37,000 --> 00:07:37,000 +We know. + +99 +00:07:38,000 --> 00:07:42,000 +I'm just going to write by test and test. + +100 +00:07:43,000 --> 00:07:44,000 +Kisses. + +101 +00:07:47,000 --> 00:07:48,000 +Just execute. + +102 +00:07:48,000 --> 00:07:49,000 +You will notice. + +103 +00:07:49,000 --> 00:07:54,000 +As of now, we have three data, so it should start. + +104 +00:07:55,000 --> 00:07:57,000 +And we are not using any loops over here. + +105 +00:07:57,000 --> 00:08:03,000 +But you will notice it will automatically start executing in the loop because data driven means it is + +106 +00:08:03,000 --> 00:08:04,000 +driving from the data. + +107 +00:08:04,000 --> 00:08:06,000 +So first time it was using User1. + +108 +00:08:06,000 --> 00:08:09,000 +No second time it executed. + +109 +00:08:09,000 --> 00:08:12,000 +This time it should use the user to you name too. + +110 +00:08:13,000 --> 00:08:16,000 +And third time it's going to use you name three. + +111 +00:08:16,000 --> 00:08:22,000 +So if you notice my same, this case is executing three different times with a different set of test + +112 +00:08:22,000 --> 00:08:23,000 +data. + +113 +00:08:25,000 --> 00:08:29,000 +So here we have implemented data driven testing. + +114 +00:08:29,000 --> 00:08:31,000 +Here we are doing data driven tests. + +115 +00:08:32,000 --> 00:08:35,000 +We are executing test kits with a different set of test data. + +116 +00:08:36,000 --> 00:08:43,000 +As of now, all the data is defined here means as of now, I just defined the data in the list itself. + diff --git a/39 - FRAMEWORK DESIGNING Data Driven Testing Framework/002 Data Driven Testing with excel data source_en.srt b/39 - FRAMEWORK DESIGNING Data Driven Testing Framework/002 Data Driven Testing with excel data source_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..68a97f88331b3ae80c9a6df709eec1903f26ffda --- /dev/null +++ b/39 - FRAMEWORK DESIGNING Data Driven Testing Framework/002 Data Driven Testing with excel data source_en.srt @@ -0,0 +1,660 @@ +1 +00:00:00,000 --> 00:00:07,000 +Now, I'll show you how we can fetch data from Excel sheet and how we can use it for taking the data + +2 +00:00:07,000 --> 00:00:08,000 +from the Excel sheet. + +3 +00:00:09,000 --> 00:00:12,000 +We need open Excel module. + +4 +00:00:12,000 --> 00:00:15,000 +So first of all, I need to check, do we have open Excel module here or not? + +5 +00:00:16,000 --> 00:00:17,000 +For that, you can go to the file. + +6 +00:00:19,000 --> 00:00:20,000 +You can go to Settings. + +7 +00:00:22,000 --> 00:00:26,000 +And if that is not installed, either install it and project interpreter. + +8 +00:00:27,000 --> 00:00:30,000 +So if you check it here, do we have open by excel? + +9 +00:00:30,000 --> 00:00:32,000 +Yes, we have open by excel means yes. + +10 +00:00:32,000 --> 00:00:34,000 +We can use Excel file. + +11 +00:00:35,000 --> 00:00:38,000 +We can read the data from the Excel sheet. + +12 +00:00:39,000 --> 00:00:41,000 +No, I'm just maintaining it. + +13 +00:00:41,000 --> 00:00:42,000 +Excel sheets. + +14 +00:00:42,000 --> 00:00:43,000 +I'm opening Excel. + +15 +00:00:46,000 --> 00:00:49,000 +And here I'm going to maintain my data, so I'm saying. + +16 +00:00:53,000 --> 00:01:08,000 +User, one pass one, you can maintain any number of data here, user to pass two user three pass three + +17 +00:01:09,000 --> 00:01:17,000 +user four, pass four for I'm assuming it, you can see it anywhere I'm just doing in my ID with the + +18 +00:01:17,000 --> 00:01:24,000 +name the data, then dot x x. + +19 +00:01:25,000 --> 00:01:27,000 +So I just save this file. + +20 +00:01:29,000 --> 00:01:38,000 +Now I'm going to big data from Excel and going to put into this list for this. + +21 +00:01:38,000 --> 00:01:45,000 +We must admit going for the bill on Excel and Excel handling plus list concept. + +22 +00:01:45,000 --> 00:01:56,000 +So first of all, for reading the data from the Excel, I'm just importing import open by Excel and + +23 +00:01:56,000 --> 00:02:02,000 +here I'm writing like World Book, open by Excel Dot Load Workbook. + +24 +00:02:03,000 --> 00:02:04,000 +What's the name of the file? + +25 +00:02:04,000 --> 00:02:07,000 +So I'm giving Lake E Drive inside the drive. + +26 +00:02:08,000 --> 00:02:10,000 +I have a file with this name. + +27 +00:02:12,000 --> 00:02:15,000 +That's a step one now inside that. + +28 +00:02:15,000 --> 00:02:21,000 +I want to move to the chute, so I'm saying as such W.K. and which you do want to work on. + +29 +00:02:21,000 --> 00:02:26,000 +I want to work on the sheet one, if you can check it here. + +30 +00:02:26,000 --> 00:02:27,000 +That's my sheet. + +31 +00:02:27,000 --> 00:02:29,000 +One list of all. + +32 +00:02:29,000 --> 00:02:37,000 +We need to find out how many rows we're having inside the sheet because if we have 10 rows, only after + +33 +00:02:37,000 --> 00:02:42,000 +that, we can identify like how many times I need to run a loop so that we can read data from each of + +34 +00:02:42,000 --> 00:02:42,000 +the rule. + +35 +00:02:42,000 --> 00:02:51,000 +So I'm saying I'm just creating available are as such Dart makes. + +36 +00:02:52,000 --> 00:02:57,000 +Rule, it is going to fetch all the number of rules from the excellent. + +37 +00:02:59,000 --> 00:03:15,000 +Now I'm going to run a loop like for I in range one two are plus one if we have 10 rows and excel. + +38 +00:03:16,000 --> 00:03:21,000 +So I need to run a loop from one to one to 10. + +39 +00:03:21,000 --> 00:03:23,000 +But when we are giving the. + +40 +00:03:23,000 --> 00:03:27,000 +So last will do whatever we are doing it exclude that value. + +41 +00:03:27,000 --> 00:03:34,000 +So if you pass odd here and we have 10 rules, so Luke will run from one to nine because last will you + +42 +00:03:34,000 --> 00:03:35,000 +will be ignored. + +43 +00:03:35,000 --> 00:03:39,000 +So what I'm doing because I want to run from the last rule, so I'm saying are +1. + +44 +00:03:39,000 --> 00:03:45,000 +So if you're getting bend rules and they excel here, the number will set 11. + +45 +00:03:45,000 --> 00:03:47,000 +But Loop will execute from one to 10. + +46 +00:03:48,000 --> 00:03:49,000 +No. + +47 +00:03:49,000 --> 00:03:56,000 +In this loop, I want to read data from username you off username and password. + +48 +00:03:56,000 --> 00:04:05,000 +So I'm just saying u-n sheet dot cell on which cell you want to work on. + +49 +00:04:05,000 --> 00:04:10,000 +I'm saying my role is I and column one. + +50 +00:04:10,000 --> 00:04:14,000 +So first, I'm creating a cell object for idle means. + +51 +00:04:14,000 --> 00:04:20,000 +Roy is going to be change, but for first column means first time, it will pick this. + +52 +00:04:20,000 --> 00:04:25,000 +Roy is going to be change, but column this, so it's going to pick username in the same way. + +53 +00:04:27,000 --> 00:04:40,000 +I'm saying as such dart cell and I do it is going to pick username and password. + +54 +00:04:41,000 --> 00:04:47,000 +But hope you remember we have seen now whatever the data we are dating from Excel, we need to store + +55 +00:04:47,000 --> 00:04:49,000 +that data into it. + +56 +00:04:49,000 --> 00:04:50,000 +Nested list. + +57 +00:04:51,000 --> 00:05:00,000 +So I'm just creating like L.A. one, which is a bank list before running the loop. + +58 +00:05:01,000 --> 00:05:07,000 +Now I'm coming to the loop and I'm saying L.A. one is a blank. + +59 +00:05:07,000 --> 00:05:09,000 +So if first time, it will be a blank blank. + +60 +00:05:09,000 --> 00:05:11,000 +But second time of the loop is running again. + +61 +00:05:11,000 --> 00:05:11,000 +It's a blank. + +62 +00:05:12,000 --> 00:05:15,000 +I'll explain it one more time now. + +63 +00:05:15,000 --> 00:05:17,000 +And one dot. + +64 +00:05:19,000 --> 00:05:20,000 +Insert. + +65 +00:05:23,000 --> 00:05:28,000 +On gyro index, I want to insert username. + +66 +00:05:30,000 --> 00:05:34,000 +And in the same way, on one index, I want to insert. + +67 +00:05:39,000 --> 00:05:39,000 +Password. + +68 +00:05:43,000 --> 00:05:47,000 +Now it is going to prepare list internal list. + +69 +00:05:47,000 --> 00:05:52,000 +So when this loop is going to be good, first time means for Rule one. + +70 +00:05:52,000 --> 00:05:56,000 +So it will read user user1 and pass one. + +71 +00:05:57,000 --> 00:06:03,000 +Two values which are read here will be stored in the list, but that is an internal list. + +72 +00:06:04,000 --> 00:06:08,000 +I want to start this list into an external list because we know that list of list. + +73 +00:06:08,000 --> 00:06:15,000 +So I'm just creating one more list here, like L.A. and by default, the blank norm thing. + +74 +00:06:17,000 --> 00:06:19,000 +L.A. Dot Insert. + +75 +00:06:21,000 --> 00:06:24,000 +On I index, just. + +76 +00:06:26,000 --> 00:06:28,000 +Add 11. + +77 +00:06:31,000 --> 00:06:38,000 +On I minus one index, just add L.A. one, because in this index start from zero. + +78 +00:06:40,000 --> 00:06:41,000 +Everything is okay. + +79 +00:06:41,000 --> 00:06:45,000 +Once this loop will complete, all the values will be stored in L.A.. + +80 +00:06:48,000 --> 00:07:00,000 +If you want to check, I'm just printing L.A. here and then return L.A., I'll explain one more time. + +81 +00:07:01,000 --> 00:07:03,000 +First of all, this data generator will run. + +82 +00:07:04,000 --> 00:07:05,000 +It will go to the workbook, then sheet. + +83 +00:07:06,000 --> 00:07:10,000 +I'm finding out how many mixed rules are there, so it's going to return. + +84 +00:07:10,000 --> 00:07:13,000 +For now, I'm running a loop. + +85 +00:07:13,000 --> 00:07:17,000 +From now, we have to list one external and internal list. + +86 +00:07:17,000 --> 00:07:20,000 +We know that we need to create list inside the list. + +87 +00:07:21,000 --> 00:07:26,000 +No, I'm running a loop from one to R plus one because of this forum. + +88 +00:07:26,000 --> 00:07:31,000 +So one two five, but we know that last week is going to be excluded, so it's going to execute one, + +89 +00:07:31,000 --> 00:07:32,000 +two four. + +90 +00:07:33,000 --> 00:07:36,000 +I'm just going to the internal list, which is blank. + +91 +00:07:36,000 --> 00:07:40,000 +I'm saying because first time it will go to the first rolled excel. + +92 +00:07:41,000 --> 00:07:45,000 +So for the first year old Excel read username and password. + +93 +00:07:45,000 --> 00:07:50,000 +So what are the username and password store into the internal list? + +94 +00:07:50,000 --> 00:07:54,000 +Then assign this internal list to the external list. + +95 +00:07:55,000 --> 00:08:02,000 +So once the loop will be completed, it will read all the rows data, create an internal list and assigning + +96 +00:08:02,000 --> 00:08:03,000 +to the external lists. + +97 +00:08:03,000 --> 00:08:04,000 +A final list will be there. + +98 +00:08:04,000 --> 00:08:10,000 +Even the loop is completed, and then I'm printing it and returning that value here. + +99 +00:08:10,000 --> 00:08:16,000 +The rest of the things I've seen because we are using here and that's all the things are seem like. + +100 +00:08:16,000 --> 00:08:22,000 +Whatever the list, which is the turn, I'm just going to the data and then we're using that value for + +101 +00:08:22,000 --> 00:08:23,000 +execution. + +102 +00:08:23,000 --> 00:08:30,000 +I'm coming here and hope you remember if you want to see the print statement, we can go for Hyphen + +103 +00:08:30,000 --> 00:08:33,000 +S, so I'm going for Hyphen S here. + +104 +00:08:34,000 --> 00:08:35,000 +So first of all, you can check it. + +105 +00:08:35,000 --> 00:08:36,000 +Here it is. + +106 +00:08:36,000 --> 00:08:41,000 +She is going to execute for four times. + +107 +00:08:41,000 --> 00:08:45,000 +It is having four values in that. + +108 +00:08:45,000 --> 00:08:49,000 +So now four times it is going to execute the tasks with a different set of data. + +109 +00:08:50,000 --> 00:08:51,000 +So let it should let me show you. + +110 +00:08:55,000 --> 00:08:57,000 +Usato before it was exhibited for the User1. + +111 +00:08:57,000 --> 00:09:01,000 +Now it's coming to the other three, so it will execute for time. + +112 +00:09:01,000 --> 00:09:03,000 +The same test gives with a different set of test data. + +113 +00:09:07,000 --> 00:09:11,000 +You three, three and now it's executing for the user for. + +114 +00:09:16,000 --> 00:09:20,000 +So we have implemented data driven approach by using biased. + +115 +00:09:23,000 --> 00:09:30,000 +And why take during tough time, because if you notice here in my desk folder, I have to discuss this. + +116 +00:09:30,000 --> 00:09:32,000 +Now it's executing biscuits. + +117 +00:09:32,000 --> 00:09:34,000 +Now it's going to the second file. + +118 +00:09:34,000 --> 00:09:35,000 +We have one test case here. + +119 +00:09:35,000 --> 00:09:37,000 +It's a total five execution. + +120 +00:09:38,000 --> 00:09:42,000 +Foster's executed four time with four different data and then second test case. + +121 +00:09:43,000 --> 00:09:44,000 +Then second test case file. + +122 +00:09:46,000 --> 00:09:50,000 +Here we have seen how we can implement data driven approach by using Biotest. + +123 +00:09:51,000 --> 00:09:52,000 +Also, I just want to update here. + +124 +00:09:53,000 --> 00:09:59,000 +Previously, we have seen we are distributing are we are distributing are going into the different folders. + +125 +00:09:59,000 --> 00:10:02,000 +No, that's my this case file here. + +126 +00:10:02,000 --> 00:10:05,000 +We're putting data generated which start up, which is not the correct approach. + +127 +00:10:05,000 --> 00:10:06,000 +Why? + +128 +00:10:06,000 --> 00:10:08,000 +Because here that are Typekit files tool. + +129 +00:10:08,000 --> 00:10:09,000 +We should only test kits. + +130 +00:10:10,000 --> 00:10:13,000 +I can create a new folder, so I'm just going to create a new directory. + +131 +00:10:14,000 --> 00:10:16,000 +I'm seeing data generally. + +132 +00:10:18,000 --> 00:10:28,000 +Inside that, I'm going to create a Python files, a new Python file, I'm seeing data Jim and I can + +133 +00:10:28,000 --> 00:10:29,000 +place my code. + +134 +00:10:30,000 --> 00:10:32,000 +So that's my data generator code. + +135 +00:10:32,000 --> 00:10:39,000 +I just got it from there and place it into the data then need to import. + +136 +00:10:39,000 --> 00:10:44,000 +So I'm importing like import open by XO. + +137 +00:10:46,000 --> 00:10:52,000 +Now we know that if you want to take the reference of this Florida, we need to create a file. + +138 +00:10:55,000 --> 00:10:59,000 +A Python file with the name and the school in it. + +139 +00:11:01,000 --> 00:11:07,000 +So before completing this lecture, I'll just go for the previous lectures, which is going to help + +140 +00:11:07,000 --> 00:11:09,000 +you to understand this complete structure. + +141 +00:11:10,000 --> 00:11:14,000 +And now from dot import data. + +142 +00:11:17,000 --> 00:11:23,000 +Now I'm going to use the data generator in my desk, so I'm writing from. + +143 +00:11:25,000 --> 00:11:30,000 +Data to generate import data. + +144 +00:11:31,000 --> 00:11:36,000 +And here we can call module method by its name. + +145 +00:11:37,000 --> 00:11:40,000 +So data dot data generator, everything is OK now. + +146 +00:11:41,000 --> 00:11:48,000 +Now I have desks in my best case and desk is fine and we have created a data generator file separately. + +147 +00:11:49,000 --> 00:11:52,000 +Now let me show you how we can go for execution. + +148 +00:11:56,000 --> 00:11:58,000 +The execution would be same as it was doing before. + +149 +00:11:59,000 --> 00:12:05,000 +Just the difference is that now we have placed data generator court in a separate file. + +150 +00:12:08,000 --> 00:12:13,000 +And I'm sure you understand this, this is executing, I'm sure you can understand this because that's + +151 +00:12:13,000 --> 00:12:14,000 +data generator file. + +152 +00:12:14,000 --> 00:12:18,000 +It's B by then file B of is a module that's a module method. + +153 +00:12:19,000 --> 00:12:24,000 +So if you want to read if you want to fetch data of any other module, first of all, we need to import + +154 +00:12:24,000 --> 00:12:25,000 +it. + +155 +00:12:25,000 --> 00:12:29,000 +So I have imported that and then module method can be called that. + +156 +00:12:29,000 --> 00:12:30,000 +By that module name. + +157 +00:12:30,000 --> 00:12:32,000 +So we're calling it by the module name. + +158 +00:12:33,000 --> 00:12:38,000 +Now we have generated a data driven framework in which data is coming from the Excel sheet. + +159 +00:12:39,000 --> 00:12:43,000 +And according to the data, if you have 10 data, it's going to execute 10 times. + +160 +00:12:43,000 --> 00:12:46,000 +If you have 10000 data, it's going to execute 10000 times. + +161 +00:12:46,000 --> 00:12:52,000 +We have implemented data driven testing in our selenium test cases. + +162 +00:12:55,000 --> 00:12:59,000 +So here we have seen how we can implement data driven testing in Sydney with Python. + +163 +00:12:59,000 --> 00:13:04,000 +We have used by test here and the data is coming from the external source, which is excel. + +164 +00:13:06,000 --> 00:13:08,000 +That's all we have for the session. + +165 +00:13:09,000 --> 00:13:10,000 +Thanks for watching this video. + diff --git a/40 - TDD & BDD Introduction/001 TDD Test Driven Development_en.srt b/40 - TDD & BDD Introduction/001 TDD Test Driven Development_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..843444e8f0fcb478b1f3bd76f34eff066b4a71b7 --- /dev/null +++ b/40 - TDD & BDD Introduction/001 TDD Test Driven Development_en.srt @@ -0,0 +1,388 @@ +1 +00:00:01,000 --> 00:00:10,000 +Welcome to the testing world, so this course is is that related to BDD means behavior driven development. + +2 +00:00:11,000 --> 00:00:14,000 +But before moving to the behavior driven development. + +3 +00:00:15,000 --> 00:00:19,000 +First, we need to understand BDD, which is this driven development. + +4 +00:00:20,000 --> 00:00:28,000 +And if we get understanding of test driven development, it will be easy for us to move onto the behavior + +5 +00:00:28,000 --> 00:00:28,000 +driven development. + +6 +00:00:30,000 --> 00:00:34,000 +So first, I'll explain what is test driven development. + +7 +00:00:36,000 --> 00:00:42,000 +So if I take an example, if you have done any coding error, so you have seen. + +8 +00:00:43,000 --> 00:00:47,000 +If I ask you to write a program which will add two numbers. + +9 +00:00:48,000 --> 00:00:49,000 +So what do we normally do? + +10 +00:00:50,000 --> 00:00:51,000 +We are writing the code. + +11 +00:00:52,000 --> 00:00:58,000 +Once we complete that program, then we're executing and checking it with the different numbers like + +12 +00:00:58,000 --> 00:01:01,000 +we are passing five and seven, which it is working or not. + +13 +00:01:01,000 --> 00:01:06,000 +Then we are passing other different numbers to check is it working or not? + +14 +00:01:06,000 --> 00:01:12,000 +So the point to it hit is before this framework, when we are doing development. + +15 +00:01:12,000 --> 00:01:18,000 +So normally first development is completed only after that developer is going for unit testing. + +16 +00:01:19,000 --> 00:01:24,000 +This approach has some limitations, or I would say it disadvantages. + +17 +00:01:25,000 --> 00:01:33,000 +So if I say I'm a developer and I got a task to develop a log in module for doing this development, + +18 +00:01:33,000 --> 00:01:36,000 +I have to write 10 different functions. + +19 +00:01:37,000 --> 00:01:38,000 +So what? + +20 +00:01:38,000 --> 00:01:42,000 +As a developer I'm doing, I will create 10 functions. + +21 +00:01:42,000 --> 00:01:49,000 +Once the development will compete, then I will write these units of that and execute unit test kits. + +22 +00:01:50,000 --> 00:01:58,000 +But let's understand the situation when a particular test case or a particular unit, this case is filled. + +23 +00:01:59,000 --> 00:02:05,000 +In that case, developers will have to change his good and which might impact other methods as well, + +24 +00:02:05,000 --> 00:02:09,000 +because all the method which I have written are interrelated. + +25 +00:02:09,000 --> 00:02:10,000 +So that was the approach. + +26 +00:02:10,000 --> 00:02:17,000 +But before moving to the TDD, like first, we are writing the code or application code, and then we + +27 +00:02:17,000 --> 00:02:20,000 +are going for a unit test cases. + +28 +00:02:21,000 --> 00:02:27,000 +This is a software development methodology, or you can call it software development model. + +29 +00:02:27,000 --> 00:02:30,000 +This is this driven development. + +30 +00:02:30,000 --> 00:02:34,000 +In the simple words, I can explain this model CS. + +31 +00:02:34,000 --> 00:02:39,000 +First of all, whenever you are going for any development, analyze how many methods you are going to + +32 +00:02:39,000 --> 00:02:41,000 +write for the development. + +33 +00:02:41,000 --> 00:02:46,000 +Once you analyze it completely, then first write best guesses for that. + +34 +00:02:46,000 --> 00:02:52,000 +As of now, if are not having actual development code, but we are writing best guesses for it. + +35 +00:02:52,000 --> 00:02:58,000 +So if I have 10 methods which I need to write for developing any functionality. + +36 +00:02:58,000 --> 00:03:04,000 +So first of all, as a developer, I'm going to write best guess is what all these methods? + +37 +00:03:04,000 --> 00:03:08,000 +So if I have 10 methods and I want to write one for each method. + +38 +00:03:08,000 --> 00:03:12,000 +So first, I will write 10 best guesses. + +39 +00:03:13,000 --> 00:03:14,000 +As of now, nothing is developed. + +40 +00:03:15,000 --> 00:03:18,000 +No developer is going to run these discourses. + +41 +00:03:19,000 --> 00:03:23,000 +And obviously, because as of now, there is no code, so they are going to be filled. + +42 +00:03:24,000 --> 00:03:27,000 +Let them feel once they are filled means yes. + +43 +00:03:27,000 --> 00:03:29,000 +My best guesses are complete. + +44 +00:03:30,000 --> 00:03:37,000 +Unit test cases are complete, failing just because as of now, we do not have any good mixed developer + +45 +00:03:38,000 --> 00:03:43,000 +write code or alternate functions and then execute the same tasks again. + +46 +00:03:44,000 --> 00:03:50,000 +So if I say I need to create 10 functions for my log in page development now I have written only one + +47 +00:03:50,000 --> 00:03:51,000 +function. + +48 +00:03:51,000 --> 00:03:54,000 +So what I'm doing, I'm not moving to the second function. + +49 +00:03:54,000 --> 00:04:01,000 +This approach sees now execute the unit this case, which you have written for the first function. + +50 +00:04:02,000 --> 00:04:09,000 +And if that is passed, move to the next one to understand it in a better way. + +51 +00:04:09,000 --> 00:04:11,000 +I can just go to this image. + +52 +00:04:12,000 --> 00:04:17,000 +So that is the cycle of BDD devices. + +53 +00:04:17,000 --> 00:04:22,000 +First, you write this cases whenever you are going for development of any module. + +54 +00:04:23,000 --> 00:04:25,000 +First, write best guesses for that. + +55 +00:04:25,000 --> 00:04:28,000 +Or I would see unit test cases for that. + +56 +00:04:29,000 --> 00:04:33,000 +Once that is complete, know execute these discourses. + +57 +00:04:34,000 --> 00:04:39,000 +It will fail because as of now, there is no development code, no application code. + +58 +00:04:39,000 --> 00:04:46,000 +Then right application code execute the test case again and check it is getting passed or not. + +59 +00:04:47,000 --> 00:04:49,000 +So if it is past means everything is okay. + +60 +00:04:49,000 --> 00:04:53,000 +If fill means your code is not correct. + +61 +00:04:53,000 --> 00:04:54,000 +We need to modify that. + +62 +00:04:56,000 --> 00:04:58,000 +What is the concept of this defect? + +63 +00:04:58,000 --> 00:04:59,000 +OK, let me come here again. + +64 +00:05:00,000 --> 00:05:07,000 +Now, I take an example, as a developer, you have written your unit test cases, then you have developed + +65 +00:05:07,000 --> 00:05:12,000 +your all modules, executed unit discusses and it is getting passed. + +66 +00:05:12,000 --> 00:05:18,000 +Means your cycle is completed because you written that this gives you written application code. + +67 +00:05:18,000 --> 00:05:23,000 +You are executing your test cases on the application code and that is working later on. + +68 +00:05:23,000 --> 00:05:30,000 +You want to refactor your code for refactoring might be you are adding some command, you're optimizing + +69 +00:05:30,000 --> 00:05:33,000 +logic, you're doing some cleanup, you are changing logic. + +70 +00:05:33,000 --> 00:05:38,000 +So for whatever the reason, if you are changing, the code means you are deferring the code. + +71 +00:05:39,000 --> 00:05:44,000 +So you need not to worry about that because you already have all the test cases. + +72 +00:05:44,000 --> 00:05:47,000 +You already have a unit test cases for it. + +73 +00:05:47,000 --> 00:05:52,000 +So after refactoring, you know you will just run your unit discuses. + +74 +00:05:53,000 --> 00:06:00,000 +So ultimately, if after refactoring, everything is getting filled, you can easily get here because + +75 +00:06:00,000 --> 00:06:03,000 +your unit test case will start failing at that point. + +76 +00:06:04,000 --> 00:06:11,000 +So if the unit is filling means after optimization, your logic is breaking, you need to rectify it. + +77 +00:06:11,000 --> 00:06:13,000 +So that was the point. + +78 +00:06:13,000 --> 00:06:19,000 +Here is, well, first you add test cases, then you write code, execute code. + +79 +00:06:19,000 --> 00:06:26,000 +And later on, if you refactor that you can follow the cycle, you can execute your code again and check + +80 +00:06:26,000 --> 00:06:31,000 +it is still your all test cases are passed or not. + +81 +00:06:31,000 --> 00:06:37,000 +If not, you need to find out the point of error and you need to rectify that in the simple language + +82 +00:06:37,000 --> 00:06:37,000 +we can understand. + +83 +00:06:38,000 --> 00:06:42,000 +And that's related to the development and unit testing. + +84 +00:06:42,000 --> 00:06:49,000 +So whenever you are going for the development, first write your test cases only after code for your + +85 +00:06:49,000 --> 00:06:53,000 +development code next time coming to. + +86 +00:06:53,000 --> 00:06:56,000 +We can find out these points in the TDD approach. + +87 +00:06:57,000 --> 00:07:00,000 +Discuses are written by the developer itself. + +88 +00:07:00,000 --> 00:07:03,000 +And first, we are writing the discuses desk. + +89 +00:07:04,000 --> 00:07:11,000 +Cases are written test each unit, or we can call it each module of the code, so I can see if that + +90 +00:07:11,000 --> 00:07:11,000 +is the log in page. + +91 +00:07:12,000 --> 00:07:13,000 +For the login page. + +92 +00:07:13,000 --> 00:07:20,000 +There is ten different methods, so I'm writing 10 best guesses to test each unit of the code. + +93 +00:07:21,000 --> 00:07:28,000 +And this approach is best suited for unit testing that is related to software development process. + +94 +00:07:29,000 --> 00:07:34,000 +Why we are learning it because BD Model, which we are going to understand, is somewhere related to + +95 +00:07:34,000 --> 00:07:35,000 +this. + +96 +00:07:36,000 --> 00:07:38,000 +So that's all we have for the session. + +97 +00:07:38,000 --> 00:07:39,000 +Thanks for watching this, you. + diff --git a/40 - TDD & BDD Introduction/002 TDD Documentation.html b/40 - TDD & BDD Introduction/002 TDD Documentation.html new file mode 100644 index 0000000000000000000000000000000000000000..1cf48014265d607013b734064b9ca81460f87583 --- /dev/null +++ b/40 - TDD & BDD Introduction/002 TDD Documentation.html @@ -0,0 +1,69 @@ + + + + + + TDD Documentation + + + + +
+
+
TDD Documentation
+

Now developer can refactor their code, add comment, optimize logic, cleanup code and execute same cases again, if any test case failed, it give alert that that logic is not working correctly

This Cycle will continue as long as developer is adding more fatures or functionality to the application

+
+
+ + diff --git a/40 - TDD & BDD Introduction/003 BDD Behavior Driven development_en.srt b/40 - TDD & BDD Introduction/003 BDD Behavior Driven development_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..9e972032df040e95f586428fc30322f638a48137 --- /dev/null +++ b/40 - TDD & BDD Introduction/003 BDD Behavior Driven development_en.srt @@ -0,0 +1,444 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +In previous session, we seen P. Diddy test driven development. + +3 +00:00:08,000 --> 00:00:17,000 +Now I'm coming to BDD behavior driven development, so it is also a software development methodology, + +4 +00:00:17,000 --> 00:00:18,000 +or you can call it model. + +5 +00:00:19,000 --> 00:00:25,000 +So this can be used while developing a complete software or automation framework. + +6 +00:00:26,000 --> 00:00:33,000 +We will more focus on automation framework because we are going to use this methodology for automation + +7 +00:00:33,000 --> 00:00:33,000 +frameworks. + +8 +00:00:34,000 --> 00:00:40,000 +First of all, I'll explain what is BDD so in BDD? + +9 +00:00:40,000 --> 00:00:45,000 +First of all, we define behavior of the application. + +10 +00:00:45,000 --> 00:00:46,000 +So what do you understand? + +11 +00:00:47,000 --> 00:00:49,000 +Didn't know what the automation we are doing. + +12 +00:00:49,000 --> 00:00:54,000 +We're analyzing the men were test cases and accordingly, we are doing AR automation. + +13 +00:00:55,000 --> 00:01:03,000 +But this approach sees, first of all, we have to analyze end to end behavior of the application. + +14 +00:01:04,000 --> 00:01:11,000 +Behavior means how this application is actually used or will be actually used by the Real-Time user + +15 +00:01:11,000 --> 00:01:13,000 +in real time involvement. + +16 +00:01:13,000 --> 00:01:17,000 +So that is called means these end to end scenarios are called behavior. + +17 +00:01:17,000 --> 00:01:24,000 +If I take an example of an e-commerce website, if I ask you right now, write in automation desks or + +18 +00:01:24,000 --> 00:01:26,000 +maybe you write men were test kits. + +19 +00:01:26,000 --> 00:01:32,000 +So normally with that, we are writing test cases, maybe in manual or or in automation for the screen + +20 +00:01:33,000 --> 00:01:36,000 +or module level, like I'm going to test first log in page. + +21 +00:01:36,000 --> 00:01:39,000 +Then my second test case would be related to the registration. + +22 +00:01:39,000 --> 00:01:42,000 +Then third for the third module fourth module. + +23 +00:01:42,000 --> 00:01:47,000 +So that is are men will test cases and these test cases we are automating right now. + +24 +00:01:47,000 --> 00:01:54,000 +But this approach says we need to go for the individual functionality, go for end to end behavior of + +25 +00:01:54,000 --> 00:01:55,000 +the application. + +26 +00:01:55,000 --> 00:01:59,000 +So first of all, we have to define behavior of the application. + +27 +00:01:59,000 --> 00:02:04,000 +So that is the first point which sees application or automation framework it does is design. + +28 +00:02:05,000 --> 00:02:12,000 +By describing how its behavior should appear to the external user, external user means actual user + +29 +00:02:12,000 --> 00:02:12,000 +of the application. + +30 +00:02:13,000 --> 00:02:18,000 +So first of all, here we have to define do behavior of the application. + +31 +00:02:19,000 --> 00:02:23,000 +Let's take the same example of e-commerce website. + +32 +00:02:23,000 --> 00:02:30,000 +So if I talk about the behavior, so behavior, one behavior would be I, a user is coming to the application, + +33 +00:02:32,000 --> 00:02:34,000 +log into the application, search for the item. + +34 +00:02:35,000 --> 00:02:39,000 +After searching, it is adding item to the cart. + +35 +00:02:39,000 --> 00:02:43,000 +Then I'm navigating to the cart, making a payment and then log out. + +36 +00:02:44,000 --> 00:02:47,000 +So that is a one and two end behavior of the application. + +37 +00:02:48,000 --> 00:02:51,000 +Second, behavior could be as a user, I'm coming to the application. + +38 +00:02:51,000 --> 00:02:57,000 +I search what item, but I'm not a registered user and my my item to the cart. + +39 +00:02:58,000 --> 00:03:02,000 +But when we're going for purchasing that item, it is asking for your credentials. + +40 +00:03:02,000 --> 00:03:03,000 +You don't have credentials. + +41 +00:03:04,000 --> 00:03:06,000 +So it will navigate you to the registration. + +42 +00:03:06,000 --> 00:03:10,000 +You will make a registration with your address and then you will go for the payment. + +43 +00:03:11,000 --> 00:03:13,000 +There is second and 10 behavior. + +44 +00:03:13,000 --> 00:03:15,000 +What BDD approach sees. + +45 +00:03:15,000 --> 00:03:19,000 +First of all, you have to define your behavior of the application. + +46 +00:03:20,000 --> 00:03:23,000 +This is called behavior or end-to-end scenarios. + +47 +00:03:23,000 --> 00:03:31,000 +Once all the behaviors are finalized, then automate these behavior by using your automation tool or + +48 +00:03:31,000 --> 00:03:33,000 +technology or library whatever you are going to use. + +49 +00:03:33,000 --> 00:03:38,000 +So first, we will define behavior once all the behavior are finalized. + +50 +00:03:38,000 --> 00:03:40,000 +Then we are going to automate that. + +51 +00:03:41,000 --> 00:03:47,000 +So in BDD framework, first step would be always define behavior of the application. + +52 +00:03:47,000 --> 00:03:51,000 +I'll show you how we can do that in the coming sessions here. + +53 +00:03:52,000 --> 00:04:00,000 +First, as I told you, stakeholders or any business user who has Real-Time understanding of the application + +54 +00:04:00,000 --> 00:04:04,000 +will define the behavior in simple English kind of language. + +55 +00:04:04,000 --> 00:04:08,000 +This language name is Girkin e r Aki. + +56 +00:04:08,000 --> 00:04:12,000 +And so that's a language which is similar to the English kind of language. + +57 +00:04:12,000 --> 00:04:21,000 +So here, stakeholder or any business user will define behavior in simple language what they're expecting + +58 +00:04:21,000 --> 00:04:21,000 +from the application. + +59 +00:04:22,000 --> 00:04:28,000 +Once their behaviors are finalized, then we are going to put coding. + +60 +00:04:28,000 --> 00:04:37,000 +Efforts to automate these behavior means we're going to put coding efforts to deliver the desired behavior + +61 +00:04:37,000 --> 00:04:40,000 +meets whatever the behavior they have written. + +62 +00:04:40,000 --> 00:04:43,000 +We are going to automate by our coding efforts. + +63 +00:04:44,000 --> 00:04:50,000 +I'm focusing mainly on the framework building framework, what we use in the automation. + +64 +00:04:50,000 --> 00:04:54,000 +I'm not talking about the developer because this model can be used for the development as well. + +65 +00:04:54,000 --> 00:04:57,000 +I'm talking about building framework for the automation. + +66 +00:04:58,000 --> 00:04:59,000 +So next, I'm moving. + +67 +00:04:59,000 --> 00:05:05,000 +Do this, so this image says, first of all, it's a top down approach. + +68 +00:05:06,000 --> 00:05:12,000 +So first of all, we have to write features we can call it behavior or entrance scenario, which is + +69 +00:05:12,000 --> 00:05:15,000 +written by the stakeholders or I can say business user. + +70 +00:05:15,000 --> 00:05:21,000 +Once these behavior on finalized, then we are going to write a step definition. + +71 +00:05:21,000 --> 00:05:26,000 +These are step definition means second level could be in the different language. + +72 +00:05:26,000 --> 00:05:27,000 +It could be Java. + +73 +00:05:27,000 --> 00:05:28,000 +It could python. + +74 +00:05:28,000 --> 00:05:32,000 +It could be any language which you want to use for it automation. + +75 +00:05:32,000 --> 00:05:38,000 +So whatever the behavior they have defined in the form of features in Girkin language, we are automating + +76 +00:05:38,000 --> 00:05:41,000 +them by using any programming language. + +77 +00:05:41,000 --> 00:05:47,000 +And this automation or this programming language automation, we call it step definition. + +78 +00:05:48,000 --> 00:05:49,000 +It could be any language. + +79 +00:05:49,000 --> 00:05:53,000 +I mentioned Zhawar over here and inside that. + +80 +00:05:53,000 --> 00:05:55,000 +That's your application code. + +81 +00:05:56,000 --> 00:06:02,000 +So actually, your step definition code, which is the automation code, is going to work on your application. + +82 +00:06:02,000 --> 00:06:08,000 +So application code, so you can take it as a top down like when we are going for the Berati framework. + +83 +00:06:09,000 --> 00:06:12,000 +Our task would be on the upper two layer. + +84 +00:06:12,000 --> 00:06:18,000 +First of all, we are going to define feature means and when behavior which isn't the correct language, + +85 +00:06:18,000 --> 00:06:24,000 +and then we are going to write test cases or automation discourses, which are automating that behavior. + +86 +00:06:25,000 --> 00:06:30,000 +So in previous session, we have seen Dee Dee Dee Dee Dee Dee in TDD. + +87 +00:06:30,000 --> 00:06:31,000 +So I told you there. + +88 +00:06:32,000 --> 00:06:34,000 +Dee Dee Dee will help us to understand BDD. + +89 +00:06:35,000 --> 00:06:41,000 +So if you understand on both places, they are saying first, right, discusses their view writing unit. + +90 +00:06:41,000 --> 00:06:47,000 +But here we are writing behavior here via writing behavior of the application. + +91 +00:06:47,000 --> 00:06:56,000 +Then once you complete the writing application code here, once behavior this case is oral to entrance + +92 +00:06:56,000 --> 00:06:59,000 +scenarios are complete, then we are writing our automation code. + +93 +00:07:01,000 --> 00:07:03,000 +Last, I'm coming here. + +94 +00:07:03,000 --> 00:07:09,000 +So what we understand in the PDT, it is also a software development methodology. + +95 +00:07:10,000 --> 00:07:13,000 +But here best guesses, right? + +96 +00:07:14,000 --> 00:07:18,000 +And one scenario we can also call it behavior written by the stakeholders. + +97 +00:07:20,000 --> 00:07:25,000 +It defined high level scenarios to set expectation from the software. + +98 +00:07:25,000 --> 00:07:33,000 +Or we can call it, application means here the test cases are written by the end user or discuses, + +99 +00:07:33,000 --> 00:07:34,000 +or we can call it here. + +100 +00:07:34,000 --> 00:07:40,000 +The behavior is defined by the end user, or we can call it actual user of the application. + +101 +00:07:41,000 --> 00:07:44,000 +Here they are, defining high level expectation. + +102 +00:07:44,000 --> 00:07:48,000 +They're not talking about individual module or individual functionality. + +103 +00:07:48,000 --> 00:07:52,000 +They're talking about high level scenario, end to end scenario of the application. + +104 +00:07:53,000 --> 00:07:56,000 +And normally this is used for acceptance testing. + +105 +00:07:56,000 --> 00:08:02,000 +So if you heard about BDD, approach is mainly used for acceptance testing. + +106 +00:08:03,000 --> 00:08:06,000 +So that is mainly used for acceptance testing. + +107 +00:08:06,000 --> 00:08:13,000 +And if you compare with the TDD, DDT was written by the developer was talking about individual module + +108 +00:08:13,000 --> 00:08:14,000 +or individual functionality. + +109 +00:08:15,000 --> 00:08:18,000 +And that is mainly used for unit testing. + +110 +00:08:18,000 --> 00:08:22,000 +So in next session, I'll show you differences between TDD and BTD. + +111 +00:08:22,000 --> 00:08:26,000 +That's all we have for the session tanks watching this week, you. + diff --git a/40 - TDD & BDD Introduction/004 BDD Documentation.html b/40 - TDD & BDD Introduction/004 BDD Documentation.html new file mode 100644 index 0000000000000000000000000000000000000000..01bf4bbc20d0253d8e238577749d0b11558395c7 --- /dev/null +++ b/40 - TDD & BDD Introduction/004 BDD Documentation.html @@ -0,0 +1,69 @@ + + + + + + BDD Documentation + + + + +
+
+
BDD Documentation
+
+
+
+ + diff --git a/40 - TDD & BDD Introduction/005 Difference between TDD and BDD_en.srt b/40 - TDD & BDD Introduction/005 Difference between TDD and BDD_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..dcd91a1dc49616d4d93c0e9b0770b708ff650e33 --- /dev/null +++ b/40 - TDD & BDD Introduction/005 Difference between TDD and BDD_en.srt @@ -0,0 +1,168 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:09,000 +So in last two sessions, we have seen what is DDT means test driven development. + +3 +00:00:10,000 --> 00:00:17,000 +And then we have seen what is BDD behavior driven development, even while explaining beauty, I have + +4 +00:00:17,000 --> 00:00:20,000 +given you difference between the nudity. + +5 +00:00:20,000 --> 00:00:24,000 +But in this lecture, we will mainly focus on differences. + +6 +00:00:25,000 --> 00:00:28,000 +We have written three differences which are in front of you. + +7 +00:00:28,000 --> 00:00:33,000 +So in BDD, discourses are written by the developer itself. + +8 +00:00:34,000 --> 00:00:37,000 +But in BDD, the or we can call it behavior. + +9 +00:00:38,000 --> 00:00:43,000 +We also collected that end to end scenario written by stakeholders. + +10 +00:00:43,000 --> 00:00:50,000 +We also called business user because only a business user can understand how the application should + +11 +00:00:50,000 --> 00:00:54,000 +behave in the real time because he will be the final user of the application. + +12 +00:00:54,000 --> 00:01:00,000 +So he is writing the behavior like I'm expecting my application should behave like this. + +13 +00:01:00,000 --> 00:01:06,000 +So here in BDD, these discourses would be written by the end user. + +14 +00:01:06,000 --> 00:01:13,000 +I would say business user and that will be in there, and that will be very simple English kind of language. + +15 +00:01:14,000 --> 00:01:21,000 +We call it Girkin, but if you talk about here in BDD, these cases are written by the developer in + +16 +00:01:21,000 --> 00:01:22,000 +that programming language. + +17 +00:01:23,000 --> 00:01:28,000 +So that is a one difference on one place will be written by a developer in any programming language, + +18 +00:01:29,000 --> 00:01:32,000 +on other plays written by the stakeholder or end user. + +19 +00:01:32,000 --> 00:01:35,000 +In simple English kind of language, we call it Girkin. + +20 +00:01:36,000 --> 00:01:40,000 +Second is if we talk about BDD. + +21 +00:01:40,000 --> 00:01:41,000 +So here we are. + +22 +00:01:41,000 --> 00:01:47,000 +Talking about testing of each module of the code means we are talking about if you have a functionality + +23 +00:01:48,000 --> 00:01:49,000 +having 10 functions. + +24 +00:01:49,000 --> 00:01:55,000 +So we are talking about to test each and every function means we are talking about unit level of code. + +25 +00:01:56,000 --> 00:01:58,000 +Here we are testing unit level of code. + +26 +00:01:58,000 --> 00:02:04,000 +But if we talk about BDD, it is not talking about the single functionality or single functions or single + +27 +00:02:04,000 --> 00:02:06,000 +piece of code it is talking about. + +28 +00:02:06,000 --> 00:02:12,000 +End to end application means here we are writing end to end scenarios. + +29 +00:02:12,000 --> 00:02:16,000 +It is not focusing on a single functionality or full functionality. + +30 +00:02:16,000 --> 00:02:23,000 +It is focusing on complete behavior of the application or IPC and when behavior of the application and + +31 +00:02:23,000 --> 00:02:24,000 +the third. + +32 +00:02:24,000 --> 00:02:29,000 +And the most important difference is DDD approach is used for unit testing. + +33 +00:02:30,000 --> 00:02:33,000 +Disability approach is used for acceptance testing. + +34 +00:02:34,000 --> 00:02:40,000 +So as a developer, if you want to work, DDD approach is best suited for you. + +35 +00:02:41,000 --> 00:02:48,000 +But if you talk about as a automation tester, we are going to develop BDD framework because when we + +36 +00:02:48,000 --> 00:02:49,000 +are testing. + +37 +00:02:49,000 --> 00:02:52,000 +So we are not talking about individual piece of code. + +38 +00:02:52,000 --> 00:02:55,000 +We are talking about application and embedded. + +39 +00:02:55,000 --> 00:02:58,000 +We will talk about end to end behavior of the application. + +40 +00:02:59,000 --> 00:03:03,000 +So that is a BDD framework, which we are going to implement in our automation project. + +41 +00:03:04,000 --> 00:03:06,000 +That's all I have for the session. + +42 +00:03:06,000 --> 00:03:07,000 +Thanks for watching this video. + diff --git a/40 - TDD & BDD Introduction/006 Document Difference between BDD and TDD.html b/40 - TDD & BDD Introduction/006 Document Difference between BDD and TDD.html new file mode 100644 index 0000000000000000000000000000000000000000..7b01ad0dc46c0ba7fd31e47d00be2b755563a8f4 --- /dev/null +++ b/40 - TDD & BDD Introduction/006 Document Difference between BDD and TDD.html @@ -0,0 +1,69 @@ + + + + + + Document Difference between BDD and TDD + + + + +
+
+
Document Difference between BDD and TDD
+
+
+
+ + diff --git a/40 - TDD & BDD Introduction/007 Common Files to be created in BDD_en.srt b/40 - TDD & BDD Introduction/007 Common Files to be created in BDD_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..15a4beb90240a5f914c328936b497fc7398c54f5 --- /dev/null +++ b/40 - TDD & BDD Introduction/007 Common Files to be created in BDD_en.srt @@ -0,0 +1,352 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:08,000 +So now I'll show you what all the common files we're having in BDD framework. + +3 +00:00:09,000 --> 00:00:13,000 +But before moving to that, I want to explain you few things over here. + +4 +00:00:14,000 --> 00:00:19,000 +First, if I talk about you want to automate web based application. + +5 +00:00:20,000 --> 00:00:29,000 +So automation is a concept in the same way I would see BDD is a concept, so I would say automation + +6 +00:00:30,000 --> 00:00:31,000 +or BDD. + +7 +00:00:32,000 --> 00:00:40,000 +Is a concept which we need to implement, then if we talk about, I would say if you want to automate + +8 +00:00:41,000 --> 00:00:46,000 +web based application, which library or API you want to use. + +9 +00:00:46,000 --> 00:00:54,000 +You are seeing selenium in the CMB if you want to implement Berati concept, which library you are going + +10 +00:00:54,000 --> 00:00:55,000 +to use. + +11 +00:00:55,000 --> 00:01:02,000 +So we have a different set of libraries like Behave G.B. here, but we are going to use the library. + +12 +00:01:02,000 --> 00:01:05,000 +One of the most popular library, which is Kokumo. + +13 +00:01:06,000 --> 00:01:10,000 +So we are going to use cucumber to implement building framework. + +14 +00:01:11,000 --> 00:01:16,000 +Then I say, OK, if you want to implement, if you want to use selenium, which programming language + +15 +00:01:16,000 --> 00:01:17,000 +language you are going to use. + +16 +00:01:18,000 --> 00:01:25,000 +So you would say, OK, I'm going to use Java in the same way when we are going to write discuses in + +17 +00:01:25,000 --> 00:01:28,000 +cucumber, which is in the English kind of language test cases. + +18 +00:01:28,000 --> 00:01:30,000 +So what will be the language in your case? + +19 +00:01:30,000 --> 00:01:32,000 +So that will be Girkin. + +20 +00:01:33,000 --> 00:01:36,000 +So first, we need to understand these two things. + +21 +00:01:36,000 --> 00:01:40,000 +Automation, or BDD, is a concept to implement automation. + +22 +00:01:40,000 --> 00:01:44,000 +You can use different API like selenium to implement BDD. + +23 +00:01:45,000 --> 00:01:46,000 +We can use different API. + +24 +00:01:46,000 --> 00:01:50,000 +Here we are going to use KOKUMO to write code in selenium. + +25 +00:01:50,000 --> 00:01:54,000 +We are going to use Java to write code in cucumber. + +26 +00:01:54,000 --> 00:01:56,000 +We are going to use the English kind of language. + +27 +00:01:56,000 --> 00:01:57,000 +We call it Girkin. + +28 +00:01:58,000 --> 00:02:04,000 +Now I'm going to explain you a framework and then will we will cover Girkin language. + +29 +00:02:04,000 --> 00:02:08,000 +Here we are using cucumber and the language would be Girkin. + +30 +00:02:09,000 --> 00:02:14,000 +So first file that we have, we are going to have in the bility framework is a feature file. + +31 +00:02:16,000 --> 00:02:23,000 +In previous session, we have seen, first of all, stakeholder or end user or business user will write + +32 +00:02:23,000 --> 00:02:27,000 +discuses in English kind of language, and that language is Girkin. + +33 +00:02:27,000 --> 00:02:31,000 +So we're he's going to write discuses entrance in. + +34 +00:02:32,000 --> 00:02:35,000 +So we need to create a feature file in this feature file. + +35 +00:02:36,000 --> 00:02:38,000 +We are going to have end to end scenario. + +36 +00:02:38,000 --> 00:02:44,000 +We also call it behavior of the application that is written by business user or stakeholder. + +37 +00:02:45,000 --> 00:02:48,000 +And it will be in simple English kind of language. + +38 +00:02:48,000 --> 00:02:49,000 +We call it Girkin. + +39 +00:02:50,000 --> 00:02:55,000 +So that is the first file we are going to write when we are going to implement bility framework. + +40 +00:02:56,000 --> 00:02:58,000 +And if you check it here, there is a simple file. + +41 +00:02:59,000 --> 00:03:00,000 +I have given here. + +42 +00:03:00,000 --> 00:03:07,000 +So if you notice we are writing test cases or I say entrants never use in simple English language. + +43 +00:03:08,000 --> 00:03:13,000 +So that's the first file we are going to create in framework. + +44 +00:03:14,000 --> 00:03:19,000 +The next file would be step definition file. + +45 +00:03:19,000 --> 00:03:21,000 +OK, what is the definition file? + +46 +00:03:22,000 --> 00:03:28,000 +If you talk about the feature file that we have created in which we have written test cases in Girkin + +47 +00:03:28,000 --> 00:03:35,000 +language, that simple English kind of language, but to execute these discourses, we need automation + +48 +00:03:35,000 --> 00:03:35,000 +code. + +49 +00:03:36,000 --> 00:03:43,000 +So here we are going to write step definition file in which we will have actual automation code that + +50 +00:03:43,000 --> 00:03:49,000 +will be written in any programming language like Java, Python or any other which you are using. + +51 +00:03:49,000 --> 00:03:53,000 +And this file is written by the automation tester. + +52 +00:03:53,000 --> 00:03:56,000 +That is the automation tester task. + +53 +00:03:56,000 --> 00:03:58,000 +So that would be second file. + +54 +00:03:58,000 --> 00:03:59,000 +We are going to write. + +55 +00:04:00,000 --> 00:04:06,000 +Third would be another file, so another you can take it as to trigger execution. + +56 +00:04:07,000 --> 00:04:12,000 +If you talk about Java, when we are writing code in Java and we want to execute, we need main method. + +57 +00:04:13,000 --> 00:04:19,000 +If you talk about G-Unit or test energy, we need annotations in the same way when you want to execute + +58 +00:04:20,000 --> 00:04:21,000 +your BDD framework. + +59 +00:04:21,000 --> 00:04:22,000 +We need a file. + +60 +00:04:22,000 --> 00:04:26,000 +We call it the letter file with the help of which we can trigger execution. + +61 +00:04:26,000 --> 00:04:32,000 +And after doing some settings, we can generate report so that a simple render file. + +62 +00:04:34,000 --> 00:04:37,000 +Now I'm moving to the next image, and that is very important. + +63 +00:04:39,000 --> 00:04:40,000 +Here we can make a link. + +64 +00:04:41,000 --> 00:04:47,000 +So if you can see this image here, on the left hand side, there is a simple feature file for each + +65 +00:04:47,000 --> 00:04:49,000 +step written in the simple in this feature file. + +66 +00:04:50,000 --> 00:04:52,000 +Like, one step is users on the login page. + +67 +00:04:53,000 --> 00:04:58,000 +So to bring users on the login page, we have to write automation code. + +68 +00:04:58,000 --> 00:05:05,000 +So if you can check it here, we have written this step definition file, which have a method for each + +69 +00:05:05,000 --> 00:05:06,000 +step. + +70 +00:05:06,000 --> 00:05:11,000 +So to bring users on the login page, we have a method that we have written the automation code, so + +71 +00:05:11,000 --> 00:05:13,000 +we will have to write code in this way. + +72 +00:05:15,000 --> 00:05:18,000 +First, we have to write, feature, file and to automate that task. + +73 +00:05:19,000 --> 00:05:23,000 +We have to write step definition file, which will have actual automation code. + +74 +00:05:24,000 --> 00:05:26,000 +At the end, we would have a render file. + +75 +00:05:26,000 --> 00:05:30,000 +So that's my render file, which is going to execute this complete framework. + +76 +00:05:31,000 --> 00:05:32,000 +Last. + +77 +00:05:32,000 --> 00:05:33,000 +We can check it here. + +78 +00:05:33,000 --> 00:05:39,000 +We are going to have feature file in which we are going to write test cases in a single English kind + +79 +00:05:39,000 --> 00:05:43,000 +of language that is Girkin, and we are going to use some key words here. + +80 +00:05:43,000 --> 00:05:46,000 +These are the key words given when then I'll show you later. + +81 +00:05:47,000 --> 00:05:53,000 +Then we have actual automation code in the test kits, while we also call it step definition file. + +82 +00:05:53,000 --> 00:06:01,000 +There we can write code by using selenium or any other API with different programming language. + +83 +00:06:01,000 --> 00:06:03,000 +So we're going to use the video. + +84 +00:06:03,000 --> 00:06:09,000 +Then we have a test runner which is going to execute our test kit and also going to generate report + +85 +00:06:10,000 --> 00:06:17,000 +so that these are common files which we are going to create in the BD framework in next session onwards. + +86 +00:06:17,000 --> 00:06:23,000 +I'll I'll help you to write feature file by using Girkin language. + +87 +00:06:24,000 --> 00:06:25,000 +That's all we have for the session. + +88 +00:06:26,000 --> 00:06:27,000 +Thanks watching this video. + diff --git a/40 - TDD & BDD Introduction/008 Documentation Common Files to be created in BDD.html b/40 - TDD & BDD Introduction/008 Documentation Common Files to be created in BDD.html new file mode 100644 index 0000000000000000000000000000000000000000..8b2edc9046ebfaf0366835ed52126d8ed1625c2e --- /dev/null +++ b/40 - TDD & BDD Introduction/008 Documentation Common Files to be created in BDD.html @@ -0,0 +1,69 @@ + + + + + + Documentation Common Files to be created in BDD + + + + +
+
+
Documentation Common Files to be created in BDD
+

Common Files in BDD Framework

Feature File : 

  1.             Having END to END Scenario (Behavior of Application)

  2.             Written by Business user or StakeHolder

  3.     In Simple English Language (Gherkin)

Step Definition File : Having actual automation code

                                      Written in programming language (Like Java, Python etc)

                                      Written by Automation Tester


Runner File  :   To trigger execution

                           To Generate Report


+
+
+ + diff --git a/41 - Kickstart Gherkin Language for Writing Feature File/001 Define Gherkin & Feature File_en.srt b/41 - Kickstart Gherkin Language for Writing Feature File/001 Define Gherkin & Feature File_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..b6279b055bda7ff8daa396a781c3c11593154e4a --- /dev/null +++ b/41 - Kickstart Gherkin Language for Writing Feature File/001 Define Gherkin & Feature File_en.srt @@ -0,0 +1,440 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:12,000 +So previously we have seen BDD, DDD, then we have seen a difference between the BDD entity and in + +3 +00:00:12,000 --> 00:00:19,000 +the last lecture we have seen what all the common files we are going to create in BDD framework. + +4 +00:00:20,000 --> 00:00:27,000 +So if you remember, that was the image we have covered in the last session to implement BDD framework. + +5 +00:00:28,000 --> 00:00:34,000 +We are going to create a feature file, and in this feature file, we are going to write a and20 scenario + +6 +00:00:34,000 --> 00:00:35,000 +in the language. + +7 +00:00:35,000 --> 00:00:43,000 +This language is called Girkin, and then we are going to write discuses actual automation discusses + +8 +00:00:43,000 --> 00:00:44,000 +in another file. + +9 +00:00:44,000 --> 00:00:46,000 +We call it step definition. + +10 +00:00:46,000 --> 00:00:51,000 +So this file, we're we're going to right end to end scenario in Girkin language. + +11 +00:00:52,000 --> 00:00:53,000 +This file is called feature file. + +12 +00:00:54,000 --> 00:01:00,000 +So whenever we are going for the automation, first of all, we have to define behavior of the application. + +13 +00:01:00,000 --> 00:01:04,000 +We also call it and twin scenarios in a feature file. + +14 +00:01:05,000 --> 00:01:10,000 +So now we have to learn delicate language so that we can create feature files. + +15 +00:01:11,000 --> 00:01:14,000 +So we are going to start from here means from feature file. + +16 +00:01:15,000 --> 00:01:15,000 +So no. + +17 +00:01:16,000 --> 00:01:19,000 +So in cucumber, we are going to write features. + +18 +00:01:20,000 --> 00:01:23,000 +We can also call it behavior or entrance scenarios. + +19 +00:01:23,000 --> 00:01:27,000 +So this behavior or entrance scenario are written in a file. + +20 +00:01:27,000 --> 00:01:29,000 +We call it feature file. + +21 +00:01:29,000 --> 00:01:32,000 +This file will have dot feature extension. + +22 +00:01:33,000 --> 00:01:33,000 +So not. + +23 +00:01:34,000 --> 00:01:36,000 +So next, we are going to create this file. + +24 +00:01:36,000 --> 00:01:41,000 +So whenever we are going to be to the automation first, we need to create this file. + +25 +00:01:42,000 --> 00:01:49,000 +So in this feature, file behavior are written in a language and the language is called Girkin. + +26 +00:01:50,000 --> 00:01:54,000 +Now, in next few sessions, we are going to learn Girkin. + +27 +00:01:55,000 --> 00:02:00,000 +Girkin is a simple non programming language, which is quite similar to the English. + +28 +00:02:01,000 --> 00:02:07,000 +So here we are going to write English string, but we are going to use Girkin keywords. + +29 +00:02:07,000 --> 00:02:09,000 +So I'll show you what all the keywords we are having. + +30 +00:02:10,000 --> 00:02:16,000 +Then while I think Girkin in feature file, we need to remember this rule. + +31 +00:02:17,000 --> 00:02:23,000 +Each line in the feature file, which is not blank, has to start with a Girkin keyword, followed by + +32 +00:02:23,000 --> 00:02:29,000 +the text, which is in the simple English language when we are going to write Girkin language. + +33 +00:02:29,000 --> 00:02:32,000 +Just remember each line, which is not blank. + +34 +00:02:33,000 --> 00:02:38,000 +We will have to write first keyword and then data or text in front of that. + +35 +00:02:39,000 --> 00:02:45,000 +The this text will be simple English language, and the keyword would be Girkin language keyword. + +36 +00:02:46,000 --> 00:02:54,000 +So I'll show you what all the keywords are supported here in Girkin next time coming to what all the + +37 +00:02:54,000 --> 00:02:58,000 +common keywords we are having in this Girkin language. + +38 +00:02:58,000 --> 00:03:00,000 +So first keyword would be feature. + +39 +00:03:01,000 --> 00:03:07,000 +So file, which we are going to create file extension. + +40 +00:03:10,000 --> 00:03:12,000 +Would be Dot feature. + +41 +00:03:13,000 --> 00:03:23,000 +And these are the keywords we are going to use while writing and win scenarios in getting language in + +42 +00:03:23,000 --> 00:03:24,000 +this feature file. + +43 +00:03:24,000 --> 00:03:32,000 +So first keyword would be feature this you can understand as a test scenario or you can call it test + +44 +00:03:32,000 --> 00:03:34,000 +suite in the next session. + +45 +00:03:34,000 --> 00:03:41,000 +I'll show you what is feature, but that is a first keyword which we are going to write in our feature + +46 +00:03:41,000 --> 00:03:41,000 +files. + +47 +00:03:43,000 --> 00:03:49,000 +Second keyword, which we are going to use, is scenario scenario is like a test case. + +48 +00:03:50,000 --> 00:03:54,000 +So we are going to write multiple test keys in this single feature file. + +49 +00:03:54,000 --> 00:03:56,000 +I'll show you how we're going to write it. + +50 +00:03:57,000 --> 00:03:59,000 +Then we have given when then. + +51 +00:03:59,000 --> 00:04:03,000 +And and but these keywords are used to write the skip steps. + +52 +00:04:04,000 --> 00:04:08,000 +Then we have a keyword background scenario outline example. + +53 +00:04:09,000 --> 00:04:11,000 +So these are the common keywords. + +54 +00:04:12,000 --> 00:04:17,000 +Then we have a few more options which we are going to use while writing Girkin language. + +55 +00:04:17,000 --> 00:04:24,000 +One is document string means whatever the documentation you want to do in your feature file, we will + +56 +00:04:24,000 --> 00:04:28,000 +use this three time double quotes here. + +57 +00:04:29,000 --> 00:04:31,000 +This is for documentation data. + +58 +00:04:31,000 --> 00:04:38,000 +Table Data Table is used to define data which we want to use in our automation that we are going to + +59 +00:04:38,000 --> 00:04:39,000 +develop by using pipe symbol. + +60 +00:04:40,000 --> 00:04:48,000 +Big banks are used to control the execution, so we are going to use these decks while execution of + +61 +00:04:48,000 --> 00:04:49,000 +these discuses. + +62 +00:04:49,000 --> 00:04:55,000 +So these are the common keywords which we are going to use while writing feature file. + +63 +00:04:56,000 --> 00:05:03,000 +In next section, I'll start how you can write Girkin language in a feature file before moving forward. + +64 +00:05:04,000 --> 00:05:06,000 +So to write this Girkin language? + +65 +00:05:06,000 --> 00:05:09,000 +We are going to use Notepad Plus Plus editor. + +66 +00:05:10,000 --> 00:05:14,000 +So first of all, you have to install Notepad Plus editor on your machine. + +67 +00:05:14,000 --> 00:05:20,000 +Then now I'll show you what all the setup we have to do for writing the feature file on Notepad. + +68 +00:05:21,000 --> 00:05:26,000 +Next, I'll show you involvement, which you need to set up the write feature file. + +69 +00:05:26,000 --> 00:05:30,000 +So the file which have not feature extension. + +70 +00:05:32,000 --> 00:05:39,000 +And we are going to get language in that right to right Girkin language. + +71 +00:05:39,000 --> 00:05:42,000 +We are going to use Notepad Plus Plus. + +72 +00:05:42,000 --> 00:05:46,000 +So first of all, you have to set up Notepad Plus Plus on a machine. + +73 +00:05:47,000 --> 00:05:55,000 +Then we are going to download the plugin so that the plugin, if I go to the browser here, this is + +74 +00:05:55,000 --> 00:06:00,000 +the plugin you need to go to the corner, download and just download zip file. + +75 +00:06:02,000 --> 00:06:04,000 +Once you download, just unzip that. + +76 +00:06:04,000 --> 00:06:10,000 +So if you can see that the unzip location, I'm just coming here. + +77 +00:06:10,000 --> 00:06:15,000 +Here you'll get a file with the name Girkin NPP utility or XML. + +78 +00:06:15,000 --> 00:06:21,000 +So for that, I'll just go to my notepad plus plus. + +79 +00:06:21,000 --> 00:06:26,000 +Go go in the language, define your language. + +80 +00:06:27,000 --> 00:06:29,000 +So here we have the option of import. + +81 +00:06:30,000 --> 00:06:31,000 +Just give the part. + +82 +00:06:32,000 --> 00:06:34,000 +So I'm just giving that part. + +83 +00:06:38,000 --> 00:06:46,000 +Import this XML file, so as we import it, shows import successfully, no means yes, now you can write + +84 +00:06:47,000 --> 00:06:52,000 +your future file or I'll take Girkin language on your note on Notepad Plus Plus as well. + +85 +00:06:53,000 --> 00:06:56,000 +Once you're done, that means involvement is setup. + +86 +00:06:56,000 --> 00:07:02,000 +Now you are ready to write Girkin language on Notepad Plus plus how we can do that. + +87 +00:07:02,000 --> 00:07:04,000 +First of all, open a blank document. + +88 +00:07:05,000 --> 00:07:08,000 +Save this document with any name. + +89 +00:07:08,000 --> 00:07:10,000 +So I'm giving the name like. + +90 +00:07:12,000 --> 00:07:20,000 +Automation feature, you can give any name extension must be feature, so as you create this feature + +91 +00:07:20,000 --> 00:07:24,000 +file, no try to use any keyword of the Gherkin. + +92 +00:07:24,000 --> 00:07:29,000 +So I'm using like feature colon as a use feature colon. + +93 +00:07:29,000 --> 00:07:31,000 +You will notice the colors change. + +94 +00:07:31,000 --> 00:07:32,000 +You are getting this. + +95 +00:07:33,000 --> 00:07:36,000 +This keyword is highlighted if we don't install this plugin. + +96 +00:07:36,000 --> 00:07:38,000 +Still, we can use Notepad, right? + +97 +00:07:38,000 --> 00:07:39,000 +Right, Girkin. + +98 +00:07:39,000 --> 00:07:42,000 +But keywords will not highlighted. + +99 +00:07:42,000 --> 00:07:49,000 +So we have installed plugins so that so that not protesters will give support of Girkin as well. + +100 +00:07:49,000 --> 00:07:51,000 +So now we are getting support of Girkin. + +101 +00:07:51,000 --> 00:07:55,000 +Whenever we are going to write and export, these keywords would be highlighted. + +102 +00:07:55,000 --> 00:07:55,000 +No. + +103 +00:07:56,000 --> 00:08:02,000 +So here in the session, we have seen first, what is the Girkin language? + +104 +00:08:02,000 --> 00:08:05,000 +We are going to write this language in the feature file. + +105 +00:08:06,000 --> 00:08:09,000 +Then what is the rule, right, Girkin? + +106 +00:08:09,000 --> 00:08:14,000 +What are what all the common keywords we are having with all the common keywords we are having? + +107 +00:08:14,000 --> 00:08:20,000 +Then we have seen how we can set up and Rahmon write, feature, file or I'll see bright Girkin language. + +108 +00:08:22,000 --> 00:08:23,000 +That's all we have for the session. + +109 +00:08:24,000 --> 00:08:25,000 +Thanks for watching this. + +110 +00:08:25,000 --> 00:08:25,000 +We do. + diff --git a/41 - Kickstart Gherkin Language for Writing Feature File/002 Feature File and Keyword_en.srt b/41 - Kickstart Gherkin Language for Writing Feature File/002 Feature File and Keyword_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..0dd25d6aa0ba73ed2ce06afe3ada159d67600931 --- /dev/null +++ b/41 - Kickstart Gherkin Language for Writing Feature File/002 Feature File and Keyword_en.srt @@ -0,0 +1,216 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:10,000 +So now I'll start writing American language, so previously we have set up Notepad++ Plus, so I'll + +3 +00:00:10,000 --> 00:00:11,000 +create a feature file over there. + +4 +00:00:11,000 --> 00:00:14,000 +And we are going to use first keyword with this feature. + +5 +00:00:15,000 --> 00:00:18,000 +First, I'm going to the Notepad Plus Plus, and that's a new file. + +6 +00:00:19,000 --> 00:00:26,000 +So in previous session, I've shown you first of all, you need to save this file with dot feature extension. + +7 +00:00:27,000 --> 00:00:28,000 +So I just save it. + +8 +00:00:29,000 --> 00:00:38,000 +So I'm saying saves and whatever the name you want to give, I'm just giving like the fun, my purchase + +9 +00:00:40,000 --> 00:00:41,000 +dot feature. + +10 +00:00:41,000 --> 00:00:43,000 +So what are the names you want to give you? + +11 +00:00:43,000 --> 00:00:43,000 +Can you? + +12 +00:00:43,000 --> 00:00:45,000 +Extension should be feature. + +13 +00:00:47,000 --> 00:00:53,000 +So that's my feature for, you know, you can write your keyword getting keywords in this file. + +14 +00:00:54,000 --> 00:00:56,000 +So first keyword is feature. + +15 +00:00:57,000 --> 00:00:58,000 +No use feature. + +16 +00:00:58,000 --> 00:01:04,000 +Column This keyword is used to define and win scenario or application feature. + +17 +00:01:05,000 --> 00:01:12,000 +So if I see I have an e-commerce application and one feature of the application is customer search and + +18 +00:01:12,000 --> 00:01:16,000 +purchase any item that is right one feature. + +19 +00:01:17,000 --> 00:01:23,000 +We can also call it behavior of the application means a customer can purchase any item from my application + +20 +00:01:23,000 --> 00:01:26,000 +or we can call it before entrants NATO. + +21 +00:01:26,000 --> 00:01:33,000 +So means, first of all, we need to give a feature which you want to automate in this particular file. + +22 +00:01:34,000 --> 00:01:36,000 +Then what would be the syntax? + +23 +00:01:36,000 --> 00:01:41,000 +So certain tasks would be, first of all, we need to give the keyword, which is feature call and then + +24 +00:01:42,000 --> 00:01:43,000 +name of the feature. + +25 +00:01:43,000 --> 00:01:49,000 +So I'm starting here and I see like feature column. + +26 +00:01:49,000 --> 00:01:50,000 +So that's the keyword. + +27 +00:01:51,000 --> 00:01:53,000 +Now we're giving the name of the features. + +28 +00:01:53,000 --> 00:02:01,000 +The name of the feature is customer search and purchase. + +29 +00:02:05,000 --> 00:02:11,000 +Purchase item from the application. + +30 +00:02:12,000 --> 00:02:18,000 +So that's my feature, which I want to automate through this feature file. + +31 +00:02:19,000 --> 00:02:21,000 +You can call it the suit as well. + +32 +00:02:21,000 --> 00:02:26,000 +It means the suit can have multiple test cases in the same way here. + +33 +00:02:26,000 --> 00:02:30,000 +This feature, this is a feature to automate this feature. + +34 +00:02:30,000 --> 00:02:32,000 +We can have multiple test cases. + +35 +00:02:33,000 --> 00:02:34,000 +Here we collect scenario. + +36 +00:02:34,000 --> 00:02:38,000 +So I'll come to the scenario in the coming say in the next session, but that's a feature. + +37 +00:02:39,000 --> 00:02:43,000 +So syntax of the feature is, first of all, we need to give keyword. + +38 +00:02:43,000 --> 00:02:46,000 +The name of the feature is in simple English language. + +39 +00:02:46,000 --> 00:02:49,000 +OK, that we have written is a simple English language. + +40 +00:02:49,000 --> 00:02:58,000 +You can write it as per your requirement, then we can give description, text and which can be in the + +41 +00:02:58,000 --> 00:02:58,000 +multiple lines. + +42 +00:02:59,000 --> 00:03:10,000 +So after this, we can define this feature so I can see like, OK, in this feature, a customer, well, + +43 +00:03:12,000 --> 00:03:28,000 +customer will come to my application, log in search, do payment so it can be in the multiple line. + +44 +00:03:28,000 --> 00:03:34,000 +This description can be in the multiple line, do payment and log out. + +45 +00:03:36,000 --> 00:03:38,000 +So we have defined our feature. + +46 +00:03:39,000 --> 00:03:42,000 +That's the name of the feature, and that is a description of the feature. + +47 +00:03:42,000 --> 00:03:47,000 +So whenever you are writing Durkin language, first of all, we have to define a feature. + +48 +00:03:48,000 --> 00:03:52,000 +After that, we are going to write test cases that I'm going to go on in the next session. + +49 +00:03:53,000 --> 00:04:00,000 +So here we have and we understood first keyboard will be the feature it is used to define and win scenario. + +50 +00:04:00,000 --> 00:04:05,000 +Or we can call it application feature or behavior, which we want to automate. + +51 +00:04:07,000 --> 00:04:14,000 +And here syntax is like feature, column, name, description and example. + +52 +00:04:15,000 --> 00:04:16,000 +That's all we have for the session. + +53 +00:04:17,000 --> 00:04:21,000 +In next session, I'll show you how we can write discuses for this feature. + +54 +00:04:22,000 --> 00:04:23,000 +Tanks watching this video. + diff --git a/41 - Kickstart Gherkin Language for Writing Feature File/003 Scenario keyword_en.srt b/41 - Kickstart Gherkin Language for Writing Feature File/003 Scenario keyword_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..a53ac10d7444e030b09cb874a2c8c62d6ec52ca1 --- /dev/null +++ b/41 - Kickstart Gherkin Language for Writing Feature File/003 Scenario keyword_en.srt @@ -0,0 +1,184 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:05,000 +So previously we have seen feature keyword. + +3 +00:00:06,000 --> 00:00:11,000 +Now I'm going to next keyword, which is scenario and scenario column. + +4 +00:00:12,000 --> 00:00:18,000 +This scenario keyword is used to define best guesses under the future. + +5 +00:00:18,000 --> 00:00:25,000 +So previously we have seen first keyword we're using feature and which shows end to end behavior of + +6 +00:00:25,000 --> 00:00:26,000 +the application. + +7 +00:00:26,000 --> 00:00:29,000 +What we can call it end to end scenario of the application. + +8 +00:00:29,000 --> 00:00:34,000 +To test that and behavior, we helped write discuses. + +9 +00:00:35,000 --> 00:00:36,000 +So here we don't collect test kits. + +10 +00:00:36,000 --> 00:00:37,000 +We call it scenario. + +11 +00:00:39,000 --> 00:00:42,000 +We can have multiple scenarios under one feature. + +12 +00:00:42,000 --> 00:00:47,000 +So previously we have created a feature and test this feature. + +13 +00:00:47,000 --> 00:00:51,000 +We are going to write multiple scenarios or we can call it multiple desks. + +14 +00:00:51,000 --> 00:00:55,000 +So not only show you what is the syntax to write scenario. + +15 +00:00:55,000 --> 00:00:58,000 +So first of all, using a keyword scenario column. + +16 +00:00:59,000 --> 00:01:00,000 +So that's my keyword. + +17 +00:01:00,000 --> 00:01:02,000 +Now what is the name of the scenario? + +18 +00:01:02,000 --> 00:01:09,000 +So if you notice here, my feature is that I want to purchase a user will come to the application and + +19 +00:01:09,000 --> 00:01:11,000 +purchase item from here. + +20 +00:01:12,000 --> 00:01:21,000 +So my first task is to like no new user or I would sit on a registered user. + +21 +00:01:23,000 --> 00:01:32,000 +Comes to application, search, register and badges. + +22 +00:01:34,000 --> 00:01:39,000 +So here we are going to right first scenario in which we are going to test this. + +23 +00:01:40,000 --> 00:01:43,000 +A feature can have multiple scenarios in the same way. + +24 +00:01:43,000 --> 00:01:48,000 +OK, I'm going to write one more scenario registered. + +25 +00:01:51,000 --> 00:02:01,000 +User search item, add to cart and searches. + +26 +00:02:01,000 --> 00:02:08,000 +So that's my second scenario in the same way, I'm going for one more scenario, and this is the name + +27 +00:02:08,000 --> 00:02:14,000 +of the scenario, which is in simple English language, so it could be anything as per your requirement + +28 +00:02:14,000 --> 00:02:16,000 +as per the requirement or application. + +29 +00:02:17,000 --> 00:02:27,000 +So I'm seeing one more scenario is registered user just third user? + +30 +00:02:30,000 --> 00:02:30,000 +Search. + +31 +00:02:33,000 --> 00:02:33,000 +Add to cart. + +32 +00:02:37,000 --> 00:02:41,000 +Ginger address and payment. + +33 +00:02:41,000 --> 00:02:48,000 +So I am a registered user, but while purchasing, I want to give our different interests. + +34 +00:02:48,000 --> 00:02:50,000 +So that is my third scenario. + +35 +00:02:50,000 --> 00:02:53,000 +So to test this feature, we are writing multiple tests. + +36 +00:02:54,000 --> 00:02:58,000 +And as of now, we have just given the keyword, name and description. + +37 +00:02:58,000 --> 00:03:04,000 +We are not writing this steps under it, but I'll show you how we can write steps in the coming sessions. + +38 +00:03:05,000 --> 00:03:11,000 +So here we have seen keyword name is CENARIO, which is used to write best guesses of a feature of the + +39 +00:03:11,000 --> 00:03:12,000 +feature. + +40 +00:03:12,000 --> 00:03:15,000 +We can have multiple test cases inside a feature that we have seen. + +41 +00:03:16,000 --> 00:03:17,000 +And what is the syntax? + +42 +00:03:17,000 --> 00:03:24,000 +So syntax is keyword name calling and the name of the scenario, which is in the simple English language. + +43 +00:03:25,000 --> 00:03:31,000 +Then we are going to write stuff of this test case or we can collect scenario, but this we will cover + +44 +00:03:31,000 --> 00:03:32,000 +in the next session. + +45 +00:03:33,000 --> 00:03:34,000 +That's all. + +46 +00:03:34,000 --> 00:03:36,000 +We have tanks watching the street you. + diff --git a/41 - Kickstart Gherkin Language for Writing Feature File/004 Given Step_en.srt b/41 - Kickstart Gherkin Language for Writing Feature File/004 Given Step_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..c927390fc6899547d7215999a5690f1f3b85064c --- /dev/null +++ b/41 - Kickstart Gherkin Language for Writing Feature File/004 Given Step_en.srt @@ -0,0 +1,240 @@ +1 +00:00:00,000 --> 00:00:02,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:10,000 +So previously, we have seen how we can, right, feature how we can rate scenario and scenario, you + +3 +00:00:10,000 --> 00:00:16,000 +can easily understand it's similar to the test cases if you have been manual testing before. + +4 +00:00:17,000 --> 00:00:20,000 +So you know that in best guesses, we have different steps. + +5 +00:00:20,000 --> 00:00:26,000 +If I take an example of log-in functionality and I'm taking example of the men were testing only. + +6 +00:00:26,000 --> 00:00:31,000 +So if you write the cases of the log-in functionality, we are writing some steps. + +7 +00:00:31,000 --> 00:00:35,000 +User comes to the login page and a username and password. + +8 +00:00:35,000 --> 00:00:37,000 +Click on Sign In button. + +9 +00:00:38,000 --> 00:00:41,000 +These are the steps like user comfortable login. + +10 +00:00:41,000 --> 00:00:46,000 +It's one step enter username with another step and password. + +11 +00:00:46,000 --> 00:00:47,000 +That's the third step. + +12 +00:00:47,000 --> 00:00:48,000 +Click on the site. + +13 +00:00:48,000 --> 00:00:50,000 +Click on the sign in button that the fourth step. + +14 +00:00:50,000 --> 00:00:57,000 +So here also, when we are defining scenarios in scenarios, we are going to write steps. + +15 +00:00:58,000 --> 00:01:02,000 +So steps are the part of each to squeeze, if we can call it a scenario here. + +16 +00:01:03,000 --> 00:01:10,000 +Common keywords, which we are going to use while writing steps are given well and been so given is + +17 +00:01:10,000 --> 00:01:16,000 +going to show the starting point, then when and then I'll show you what does it mean of each and every + +18 +00:01:16,000 --> 00:01:16,000 +key? + +19 +00:01:17,000 --> 00:01:20,000 +We can also use a keyword and input. + +20 +00:01:21,000 --> 00:01:24,000 +So here I'll start with given you. + +21 +00:01:24,000 --> 00:01:31,000 +So if you remember, scenario is a test case and biscuits is going to have multiple steps, we could + +22 +00:01:31,000 --> 00:01:32,000 +call it the steps. + +23 +00:01:33,000 --> 00:01:38,000 +So here, first step we are going to learn is given, OK? + +24 +00:01:38,000 --> 00:01:43,000 +The keyword name is given, and it is a first step of any disguise. + +25 +00:01:44,000 --> 00:01:47,000 +So here we are, defining the starting point of the desk. + +26 +00:01:48,000 --> 00:01:52,000 +Let's take an example I see you need to test log in functionality. + +27 +00:01:53,000 --> 00:01:54,000 +So what is the starting point? + +28 +00:01:54,000 --> 00:01:58,000 +Starting point is the user comes on the login page. + +29 +00:01:59,000 --> 00:02:00,000 +That's my starting point. + +30 +00:02:00,000 --> 00:02:06,000 +After that, user is performing some actions like user enter username user enter password, click on + +31 +00:02:06,000 --> 00:02:06,000 +signing button. + +32 +00:02:07,000 --> 00:02:09,000 +So these are the actions users are going to perform. + +33 +00:02:09,000 --> 00:02:12,000 +But the starting point was user is on login page. + +34 +00:02:13,000 --> 00:02:18,000 +This keyword, this given keyword is used to define the that starting point. + +35 +00:02:18,000 --> 00:02:24,000 +So this is the keyword, which is the first step of any test gives it define the starting point of the + +36 +00:02:24,000 --> 00:02:26,000 +test kit, but that is optional. + +37 +00:02:26,000 --> 00:02:29,000 +If you want to use it, you can, but can also. + +38 +00:02:29,000 --> 00:02:32,000 +You can also skip if you don't want to write it. + +39 +00:02:32,000 --> 00:02:39,000 +You can skip syntax would be given and then we're giving the context of the step, which is in the simple + +40 +00:02:39,000 --> 00:02:40,000 +English language. + +41 +00:02:41,000 --> 00:02:41,000 +OK. + +42 +00:02:41,000 --> 00:02:44,000 +Let me write given keyword here. + +43 +00:02:44,000 --> 00:02:58,000 +So I'm writing like, given that my keyword and I'm just giving like user is on logging beach. + +44 +00:02:59,000 --> 00:03:13,000 +So or we can more describe it like user, open browser and navigate open browser and the URL. + +45 +00:03:16,000 --> 00:03:23,000 +You, Earl, and navigate to log in page. + +46 +00:03:24,000 --> 00:03:30,000 +So that is my given keyword, which was the starting point of the Pesci's. + +47 +00:03:30,000 --> 00:03:36,000 +So as of now, I can just write it like this, which can so that so you can easily understand, OK, + +48 +00:03:36,000 --> 00:03:40,000 +that is the step of the desk is even this step is not mandatory. + +49 +00:03:40,000 --> 00:03:43,000 +I'm just giving so that we can easily understand it. + +50 +00:03:44,000 --> 00:03:48,000 +So now we can define, given this step in our best guesses. + +51 +00:03:50,000 --> 00:03:56,000 +So we have seen how to use given given step is usually describe initial point of the system. + +52 +00:03:57,000 --> 00:04:03,000 +So we have seen like we want to take user to the login page or also normally we use it for setting up + +53 +00:04:03,000 --> 00:04:05,000 +the configuration before running. + +54 +00:04:05,000 --> 00:04:10,000 +The test is like you want to connect with a database, you want to start browser, you want to do cleanup. + +55 +00:04:10,000 --> 00:04:16,000 +So whatever the activities you want to do before running the test case for that, the link is given. + +56 +00:04:17,000 --> 00:04:22,000 +And also, we can have multiple given steps if needed. + +57 +00:04:23,000 --> 00:04:25,000 +So that is all about given. + +58 +00:04:26,000 --> 00:04:30,000 +Next in next session, I'll show you what is when then. + +59 +00:04:31,000 --> 00:04:33,000 +And that's all. + +60 +00:04:33,000 --> 00:04:35,000 +We have tanks watching this with you. + diff --git a/41 - Kickstart Gherkin Language for Writing Feature File/005 When and Then Steps_en.srt b/41 - Kickstart Gherkin Language for Writing Feature File/005 When and Then Steps_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..6709bfc247d3c8745efabfd7908116e0ede234f9 --- /dev/null +++ b/41 - Kickstart Gherkin Language for Writing Feature File/005 When and Then Steps_en.srt @@ -0,0 +1,336 @@ +1 +00:00:00,000 --> 00:00:09,000 +Welcome to the testing world in this session, I will cover three key words when then. + +2 +00:00:09,000 --> 00:00:18,000 +And so these key words will be used when we are writing steps under the desk or we can call it a scenario. + +3 +00:00:18,000 --> 00:00:24,000 +So first, I'll show you what is when, so when is used to write actions. + +4 +00:00:24,000 --> 00:00:31,000 +We want to perform in desk use as we have taken the example of end to end such and purges. + +5 +00:00:31,000 --> 00:00:36,000 +So let me move to my feature file. + +6 +00:00:36,000 --> 00:00:41,000 +So here, if you remember, that's my desk, and that's the starting point which is given now. + +7 +00:00:41,000 --> 00:00:43,000 +We can use a keyword with the new version. + +8 +00:00:44,000 --> 00:00:48,000 +With the help of the Venky word, we are defining steps we want to perform. + +9 +00:00:48,000 --> 00:01:00,000 +So here steps would be like user internal data in search field. + +10 +00:01:00,000 --> 00:01:07,000 +So when I'm writing this test case, my step is users going to put data into the search field. + +11 +00:01:07,000 --> 00:01:15,000 +No, I want to write one more step like user click on search button whenever you want to perform more + +12 +00:01:15,000 --> 00:01:16,000 +than one action. + +13 +00:01:17,000 --> 00:01:25,000 +We can write like this when user click on search button. + +14 +00:01:25,000 --> 00:01:32,000 +But here, when you want to perform more than one action in a sequence rather than using when again, + +15 +00:01:32,000 --> 00:01:39,000 +we have to use a keyword and then keyword is used to write steps to perform action. + +16 +00:01:39,000 --> 00:01:42,000 +So my first action was user put some data into the text will. + +17 +00:01:43,000 --> 00:01:46,000 +Then I want to write one more step for the action. + +18 +00:01:46,000 --> 00:01:49,000 +So other keywords for next year, what would be end? + +19 +00:01:49,000 --> 00:01:53,000 +Whatever the number of actions one to perform, you will have to use and keyword. + +20 +00:01:54,000 --> 00:01:58,000 +So I'm saying, OK, first user enter data into the search field, then click on the search button. + +21 +00:01:59,000 --> 00:02:10,000 +Then I see and user click on Add to Cart + +22 +00:02:13,000 --> 00:02:16,000 +for the first test. + +23 +00:02:17,000 --> 00:02:17,000 +The result? + +24 +00:02:18,000 --> 00:02:25,000 +So whatever the result we got after the search user will click on, the first user will click on Add + +25 +00:02:25,000 --> 00:02:28,000 +to cart for the first search result. + +26 +00:02:29,000 --> 00:02:30,000 +So that is right. + +27 +00:02:31,000 --> 00:02:32,000 +Another action. + +28 +00:02:33,000 --> 00:02:39,000 +Then I want to perform one more action, which is user will click on my cart button. + +29 +00:02:39,000 --> 00:02:45,000 +User clicks on my card button. + +30 +00:02:45,000 --> 00:02:52,000 +So here we can understand when is the keyword which is used to write actions of the test case means + +31 +00:02:52,000 --> 00:02:54,000 +what all the actions you are performing. + +32 +00:02:55,000 --> 00:03:03,000 +But if you want to perform more than one action in a sequence after, then we can use and keyword for + +33 +00:03:03,000 --> 00:03:04,000 +any number of times. + +34 +00:03:05,000 --> 00:03:06,000 +So here we hear you. + +35 +00:03:06,000 --> 00:03:10,000 +We have seen what is the use of when cured, when is used to rate actions. + +36 +00:03:11,000 --> 00:03:11,000 +We want to perform. + +37 +00:03:12,000 --> 00:03:16,000 +But if you want to perform more than one action in a sequence, use when and then. + +38 +00:03:16,000 --> 00:03:21,000 +And so this and keyword will be used when and then both. + +39 +00:03:22,000 --> 00:03:23,000 +I'll show you how we can use with it, then. + +40 +00:03:24,000 --> 00:03:29,000 +But as of now, we have seen with the event when you want to find more than one action or verification + +41 +00:03:29,000 --> 00:03:37,000 +so that we have already seen next time coming to then keyword then is used to define validations. + +42 +00:03:38,000 --> 00:03:38,000 +OK. + +43 +00:03:39,000 --> 00:03:43,000 +When we're writing any test gifs, so we have two important factors. + +44 +00:03:43,000 --> 00:03:45,000 +One is the step of the discourse. + +45 +00:03:45,000 --> 00:03:48,000 +And second is verification. + +46 +00:03:48,000 --> 00:03:55,000 +As of now, the best guess we have written it is doing steps, but we are not doing verification. + +47 +00:03:56,000 --> 00:03:58,000 +So really, what do you want to perform verification? + +48 +00:03:59,000 --> 00:04:01,000 +We have to use a keyword with the name then. + +49 +00:04:02,000 --> 00:04:06,000 +So I'm saying, OK, here, I want to perform verification venues. + +50 +00:04:06,000 --> 00:04:12,000 +Clicking on the mid-card button item should display in his card user. + +51 +00:04:13,000 --> 00:04:14,000 +So here I am. + +52 +00:04:14,000 --> 00:04:22,000 +Writing verification step should get added item in card. + +53 +00:04:22,000 --> 00:04:26,000 +So now we added one item in the cart. + +54 +00:04:26,000 --> 00:04:36,000 +And here we are, verifying after verification, you can again write for the steps when user click on + +55 +00:04:37,000 --> 00:04:39,000 +purchase button. + +56 +00:04:44,000 --> 00:04:48,000 +And user select. + +57 +00:04:52,000 --> 00:05:00,000 +Payment mode is credit card. + +58 +00:05:03,000 --> 00:05:09,000 +So we're writing more steps, no one more thing, I want people here. + +59 +00:05:11,000 --> 00:05:15,000 +As of now, we have done verification and we are doing exactly one verification. + +60 +00:05:15,000 --> 00:05:18,000 +But it could be more than one verification. + +61 +00:05:18,000 --> 00:05:22,000 +So like I want to check use should get added item to the cart. + +62 +00:05:23,000 --> 00:05:26,000 +We should get rid of that item in front of it. + +63 +00:05:27,000 --> 00:05:29,000 +So we want to go forward to elections. + +64 +00:05:29,000 --> 00:05:36,000 +So after then, if you want to make one more validation we can use and means this time this and will + +65 +00:05:36,000 --> 00:05:37,000 +work with, then. + +66 +00:05:38,000 --> 00:05:43,000 +So whenever we are putting end, it will check what we have written, what key word we have written + +67 +00:05:43,000 --> 00:05:43,000 +before that. + +68 +00:05:44,000 --> 00:05:52,000 +So these three end are linked with this win, but this end is link with then. + +69 +00:05:52,000 --> 00:05:55,000 +So I'm saying, OK, here, I want to put one more validation. + +70 +00:05:56,000 --> 00:06:08,000 +User should get prize of item in front of item name. + +71 +00:06:08,000 --> 00:06:10,000 +So what are the verification you want to put? + +72 +00:06:10,000 --> 00:06:11,000 +You can put it over here. + +73 +00:06:12,000 --> 00:06:18,000 +Here we have written only a few steps of the test case in the same way you are going to write all the + +74 +00:06:18,000 --> 00:06:18,000 +steps. + +75 +00:06:18,000 --> 00:06:25,000 +All the verification to it will be a one scenario means one is in the same way you can define second + +76 +00:06:25,000 --> 00:06:28,000 +scenario, third scenario, any number of scenarios. + +77 +00:06:28,000 --> 00:06:29,000 +You can write it over here. + +78 +00:06:30,000 --> 00:06:37,000 +So here in this session, we have seen what is the use of when you work, what is then covered and how + +79 +00:06:37,000 --> 00:06:38,000 +we can use it? + +80 +00:06:38,000 --> 00:06:40,000 +And what is the end keyword that is important? + +81 +00:06:41,000 --> 00:06:46,000 +This is the keyword with which we can use with the when and then both when you want to define more than + +82 +00:06:46,000 --> 00:06:48,000 +one action or more than one verification. + +83 +00:06:49,000 --> 00:06:51,000 +We are going to use this and keyword. + +84 +00:06:52,000 --> 00:06:56,000 +That's all we have for the session tanks watching this video. + diff --git a/41 - Kickstart Gherkin Language for Writing Feature File/006 Background Step_en.srt b/41 - Kickstart Gherkin Language for Writing Feature File/006 Background Step_en.srt new file mode 100644 index 0000000000000000000000000000000000000000..26f7a0e14a39220282c03e0cf7b113c66b2b9858 --- /dev/null +++ b/41 - Kickstart Gherkin Language for Writing Feature File/006 Background Step_en.srt @@ -0,0 +1,164 @@ +1 +00:00:00,000 --> 00:00:01,000 +Welcome to the testing world. + +2 +00:00:03,000 --> 00:00:13,000 +So previously we have seen given when then and also and step now we are comfortable how the right scenario + +3 +00:00:13,000 --> 00:00:17,000 +and steps of the scenario means steps of the Pesci's. + +4 +00:00:17,000 --> 00:00:20,000 +Now I'll show you one more key word with the name background. + +5 +00:00:20,000 --> 00:00:23,000 +OK, first of all, we need to understand what is the use of that. + +6 +00:00:24,000 --> 00:00:27,000 +So let me come to my scenario here. + +7 +00:00:27,000 --> 00:00:36,000 +And as of now, I have written one scenario in the same way we can write many scenarios and the structure + +8 +00:00:36,000 --> 00:00:36,000 +would be same. + +9 +00:00:37,000 --> 00:00:41,000 +We are putting given when and then what are the key words you want to use? + +10 +00:00:41,000 --> 00:00:42,000 +You can use it. + +11 +00:00:42,000 --> 00:00:49,000 +As of now, I'm just doing copy paste, but real time we can have a different set of scenarios. + +12 +00:00:49,000 --> 00:00:57,000 +We could have a situation where you can step in for all scenarios under a feature known as of now. + +13 +00:00:57,000 --> 00:01:03,000 +This is the repeat step for all the scenarios, and we are writing it to all scenarios level. + +14 +00:01:04,000 --> 00:01:12,000 +So here Beckenham comes into the picture, but we can use background only when all the scenarios having + +15 +00:01:12,000 --> 00:01:13,000 +seem given step. + +16 +00:01:13,000 --> 00:01:17,000 +So no background is coming into picture background. + +17 +00:01:17,000 --> 00:01:23,000 +Key word is used when we hear all the scenarios and feature having seem given step. + +18 +00:01:24,000 --> 00:01:30,000 +So because we are repeating it in all the scenarios, we can write it separately using background keyword + +19 +00:01:31,000 --> 00:01:32,000 +how we can do that. + +20 +00:01:32,000 --> 00:01:33,000 +I'm just coming here. + +21 +00:01:34,000 --> 00:01:36,000 +I can use a keyword, which is background something. + +22 +00:01:40,000 --> 00:01:44,000 +Bit grown background, Colleen. + +23 +00:01:45,000 --> 00:01:49,000 +So that is a background step now this given area. + +24 +00:01:49,000 --> 00:01:53,000 +I can just cut and we can place here in the background. + +25 +00:01:55,000 --> 00:01:58,000 +So I'm just coming here and we to find a background. + +26 +00:01:58,000 --> 00:02:02,000 +Now we can remove this given section from all the death cases. + +27 +00:02:03,000 --> 00:02:04,000 +We have defined it separately. + +28 +00:02:05,000 --> 00:02:09,000 +So now I'm going to each of the scenario and removing this given. + +29 +00:02:10,000 --> 00:02:15,000 +So now we have defined a bedroom, which is the initial step for all the scenarios, or we can call + +30 +00:02:15,000 --> 00:02:16,000 +it Pesci's. + +31 +00:02:16,000 --> 00:02:22,000 +So when we are going to actually execute our test cases means when we are going to actually execute + +32 +00:02:22,000 --> 00:02:24,000 +our scenarios before each of the scenario. + +33 +00:02:25,000 --> 00:02:26,000 +This background will execute. + +34 +00:02:27,000 --> 00:02:33,000 +So if you heard about if you have gone through G-Unit or testing before the test case, it is executing + +35 +00:02:33,000 --> 00:02:38,000 +before annotation in the same way here before each of the scenario. + +36 +00:02:38,000 --> 00:02:40,000 +This bedroom will execute. + +37 +00:02:41,000 --> 00:02:46,000 +But again, I'm repeating we can use this bedroom only if you one step. + +38 +00:02:46,000 --> 00:02:52,000 +It seemed for all scenarios of this feature and the Texas bedroom column. + +39 +00:02:54,000 --> 00:02:58,000 +So here we have seen what is bedroom and what is the use of the bedroom? + +40 +00:02:59,000 --> 00:03:00,000 +That's all we have for the session. + +41 +00:03:01,000 --> 00:03:02,000 +Tanks watching this video? +