This commit is contained in:
Aurélien Plancke 2021-06-01 17:19:34 +02:00
parent 812a55f185
commit 8efa07055a
3 changed files with 129 additions and 1094 deletions

View File

@ -281,6 +281,7 @@ if __name__ == "__main__":
]
process = subprocess.Popen(cmdProcess)
process.wait()
time.sleep(5)
driver.get(
"https://"
+ SCODOC_ADMIN_ID
@ -290,30 +291,31 @@ if __name__ == "__main__":
+ BASE_NOT_SECURED_URL
+ "force_admin_authentication"
)
driver.get(BASE_URL)
driver.find_element_by_id("utilisateur_Vue").click()
driver.get(BASE_URL + NOM_DPT + "/Scolarite")
driver.find_element_by_id("utilisateurs_Vue").click()
time.sleep(5)
if SCODOC_CHEF_ID not in driver.page_source:
constructValue = Ens + NOM_DPT
constructValue = "Ens" + NOM_DPT
driver.find_element_by_id("creer_Utilisateur").click()
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id().send_keys("chef")
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_xpath("//input[@name='" + constructValue + "]").click()
driver.find_element_by_xpath("//input[@name='force::list").click()
driver.find_element_by_id("tf_nom").send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id("tf_user_name").send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id("tf_prenom").send_keys("chef")
driver.find_element_by_id("tf_passwd").send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_id("tf_passwd2").send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_xpath("//input[@value='" + constructValue + "']").click()
driver.find_element_by_xpath("//input[@value='force:list']").click()
driver.find_element_by_id("tf_submit").click()
driver.find_element_by_id("utilisateur_Vue").click()
driver.find_element_by_id("utilisateurs_Vue").click()
if SCODOC_ENS_ID not in driver.page_source:
constructValue = Ens + NOM_DPT
constructValue = "Ens" + NOM_DPT
driver.find_element_by_id("creer_Utilisateur").click()
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id().send_keys("chef")
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_xpath("//input[@name='" + constructValue + "]").click()
driver.find_element_by_xpath("//input[@name='force::list").click()
driver.find_element_by_id("tf_nom").send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id("tf_user_name").send_keys(SCODOC_CHEF_ID)
driver.find_element_by_id("tf_prenom").send_keys("ens")
driver.find_element_by_id("tf_passwd").send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_id("tf_passwd2").send_keys(SCODOC_CHEF_PASS)
driver.find_element_by_xpath("//input[@value='" + constructValue + "']").click()
driver.find_element_by_xpath("//input[@name='force:list']").click()
driver.find_element_by_id("tf_submit").click()
driver.find_element_by_id("utilisateur_Vue").click()
driver.find_element_by_id("utilisateurs_Vue").click()
unittest.main()

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()