Skip to content

Commit 3ad9294

Browse files
committed
Implicit waits
1 parent 7317533 commit 3ad9294

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

2-Interactions/geckodriver.log

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
1713945049012 geckodriver INFO Listening on 127.0.0.1:50264
2+
1713945052110 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "--remote-debugging-port" "50265" "--remote-allow-hosts" "localhost" "-no-remote" "-profile" "C:\\Users\\HP\\AppData\\Local\\Temp\\rust_mozprofile2rjyZ6"
3+
console.warn: services.settings: Ignoring preference override of remote settings server
4+
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
5+
1713945052940 Marionette INFO Marionette enabled
6+
Dynamically enable window occlusion 0
7+
1713945053041 Marionette INFO Listening on port 50275
8+
WebDriver BiDi listening on ws://127.0.0.1:50265
9+
Read port: 50275
10+
1713945053318 RemoteAgent WARN TLS certificate errors will be ignored for this session
11+
DevTools listening on ws://127.0.0.1:50265/devtools/browser/488ba7d6-fae8-4653-bd66-5852eaeff676
12+
1713945068852 Marionette INFO Stopped listening on port 50275
13+
Dynamically enable window occlusion 1
14+
1713945076762 geckodriver INFO Listening on 127.0.0.1:50330
15+
1713945079847 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "--remote-debugging-port" "50331" "--remote-allow-hosts" "localhost" "-no-remote" "-profile" "C:\\Users\\HP\\AppData\\Local\\Temp\\rust_mozprofileFafBHk"
16+
console.warn: services.settings: Ignoring preference override of remote settings server
17+
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
18+
1713945080250 Marionette INFO Marionette enabled
19+
Dynamically enable window occlusion 0
20+
1713945080332 Marionette INFO Listening on port 50340
21+
WebDriver BiDi listening on ws://127.0.0.1:50331
22+
Read port: 50340
23+
1713945080526 RemoteAgent WARN TLS certificate errors will be ignored for this session
24+
DevTools listening on ws://127.0.0.1:50331/devtools/browser/1d83737f-de7e-4e64-91cc-331b43ea93a1
25+
1713945093617 Marionette INFO Stopped listening on port 50340
26+
Dynamically enable window occlusion 1
27+
1713945105216 geckodriver INFO Listening on 127.0.0.1:50397
28+
1713945108285 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "--remote-debugging-port" "50398" "--remote-allow-hosts" "localhost" "-no-remote" "-profile" "C:\\Users\\HP\\AppData\\Local\\Temp\\rust_mozprofilesn3Mlt"
29+
console.warn: services.settings: Ignoring preference override of remote settings server
30+
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
31+
1713945108729 Marionette INFO Marionette enabled
32+
Dynamically enable window occlusion 0
33+
1713945108825 Marionette INFO Listening on port 50407
34+
WebDriver BiDi listening on ws://127.0.0.1:50398
35+
Read port: 50407
36+
1713945109066 RemoteAgent WARN TLS certificate errors will be ignored for this session
37+
DevTools listening on ws://127.0.0.1:50398/devtools/browser/5c622aee-b3d5-412c-a4b8-c1736f34aa91
38+
1713945132433 Marionette INFO Stopped listening on port 50407
39+
Dynamically enable window occlusion 1
40+
1713945255791 geckodriver INFO Listening on 127.0.0.1:50524
41+
1713945258828 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "--remote-debugging-port" "50525" "--remote-allow-hosts" "localhost" "-no-remote" "-profile" "C:\\Users\\HP\\AppData\\Local\\Temp\\rust_mozprofilehuv3VT"
42+
console.warn: services.settings: Ignoring preference override of remote settings server
43+
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
44+
1713945259208 Marionette INFO Marionette enabled
45+
Dynamically enable window occlusion 0
46+
1713945259289 Marionette INFO Listening on port 50533
47+
WebDriver BiDi listening on ws://127.0.0.1:50525
48+
Read port: 50533
49+
1713945259516 RemoteAgent WARN TLS certificate errors will be ignored for this session
50+
DevTools listening on ws://127.0.0.1:50525/devtools/browser/1efc94a5-fc12-49c8-94a5-9f8e9807c923
51+
1713945291025 addons.xpi ERROR System addon update list error SyntaxError: XMLHttpRequest.open: 'http://%(server)s/dummy-system-addons.xml' is not a valid URL.
52+
1713945301950 Marionette INFO Stopped listening on port 50533
53+
Dynamically enable window occlusion 1

2-Interactions/implicit.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import time
2+
from selenium import webdriver
3+
from selenium.webdriver.common.by import By
4+
5+
# Firefox webdriver
6+
fDriver = webdriver.Firefox()
7+
8+
# wait until 5 seconds if object is not displayed
9+
# 1.5 second to reach next page- execution will resume in 1.5 seconds
10+
# if object do not show up at all, then max time your test waits for 5 seconds
11+
fDriver.implicitly_wait(5)
12+
13+
# Driver
14+
fDriver.get('https://rahulshettyacademy.com/seleniumPractise/#/')
15+
16+
# Get and count elements
17+
fDriver.find_element(By.CSS_SELECTOR, "input.search-keyword").send_keys('ber')
18+
time.sleep(4)
19+
count = len(fDriver.find_elements(By.XPATH, "//div[@class='products']/div"))
20+
assert count == 3
21+
22+
# Add elements to the cart
23+
buttons = fDriver.find_elements(By.XPATH, "//div[@class='product-action']/button")
24+
for button in buttons:
25+
button.click()
26+
27+
# NOTE: Site https://wp-eshop.ggeorgiou.work/, products= (hoodie)

0 commit comments

Comments
 (0)