-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch-firefox.py
35 lines (27 loc) · 1.22 KB
/
search-firefox.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This tests the advanced search functionality in Firefox.
import sys, getopt
import wait
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.service import Service
opts, args = getopt.getopt(sys.argv[1:], "d", ["debug"])
print("Running test " + sys.argv[0])
# launch
driver = webdriver.Firefox(service=Service(executable_path=GeckoDriverManager().install()))
# check search page
driver.get('https://zed.dev.reelradio.com/search.php')
driver.find_element(by=By.NAME, value='search_query').send_keys('Tom Shannon' + Keys.ENTER)
wait.pause(opts)
driver.find_element(by=By.NAME, value='search_query').clear()
driver.find_element(by=By.NAME, value='search_query').send_keys('Sacramento' + Keys.ENTER)
wait.pause(opts)
driver.find_element(by=By.NAME, value='search_query').clear()
driver.find_element(by=By.NAME, value='search_query').send_keys('tina delgado' + Keys.ENTER)
wait.pause(opts)
driver.find_element(by=By.NAME, value='search_query').clear()
driver.find_element(by=By.NAME, value='search_query').send_keys('' + Keys.ENTER)
wait.pause(opts)
driver.quit()