File tree 3 files changed +48
-0
lines changed
3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 50
50
ActualList .append (data .text )
51
51
52
52
assert ExpectedList == ActualList
53
+
54
+ #taking screenshots
55
+ driver .get_screenshot_as_file ("products" )
Original file line number Diff line number Diff line change
1
+ import time
2
+ from selenium import webdriver
3
+ from selenium .webdriver .chrome .service import Service
4
+
5
+ chrome_options = webdriver .ChromeOptions ()
6
+ # how to run browser in headless mood
7
+ chrome_options .add_argument ("headless" )
8
+
9
+ # how to ignore certification errors
10
+ chrome_options .add_argument ("--ignore-certificate-errors" )
11
+
12
+ # Maximize screen mood
13
+ chrome_options .add_argument ("--start-maximized" )
14
+
15
+
16
+
17
+ # Chrome browser invoke by driver through manually
18
+ service_obj = Service ("C:\\ Users\\ Proshanta\\ Desktop\\ PythonAutomation\\ driver\\ chromedriver.exe" )
19
+ driver = webdriver .Chrome (service = service_obj , options = chrome_options )
20
+
21
+ driver .get ("https://rahulshettyacademy.com/seleniumPractise/#/" )
22
+ print (driver .title )
23
+ time .sleep (5 )
Original file line number Diff line number Diff line change
1
+ import time
2
+ from selenium import webdriver
3
+ from selenium .webdriver .chrome .service import Service
4
+
5
+ chrome_options = webdriver .ChromeOptions ()
6
+ # how to run browser in headless mood
7
+ chrome_options .add_argument ("headless" )
8
+
9
+ # how to ignore certification errors
10
+ chrome_options .add_argument ("--ignore-certificate-errors" )
11
+
12
+ # Chrome browser invoke by driver through manually
13
+ service_obj = Service ("C:\\ Users\\ Proshanta\\ Desktop\\ PythonAutomation\\ driver\\ chromedriver.exe" )
14
+ driver = webdriver .Chrome (service = service_obj , options = chrome_options )
15
+
16
+ driver .get ("https://rahulshettyacademy.com/seleniumPractise/#/" )
17
+ driver .maximize_window ()
18
+ time .sleep (5 )
19
+
20
+ # how to copy one list to another
21
+ List = ['1' , '2' , '3' ]
22
+ CopyList = List .copy ()
You can’t perform that action at this time.
0 commit comments