Add function create_agent in PAN2.py
This commit is contained in:
parent
85aae1f521
commit
879d51740b
|
@ -1,6 +1,8 @@
|
|||
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
from include.common_classes_60 import PandoraWebDriverTestCase
|
||||
from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards
|
||||
from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards,create_agent
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
@ -13,24 +15,32 @@ class PAN2(PandoraWebDriverTestCase):
|
|||
test_name = u'PAN_2'
|
||||
test_description = u'Creation two agents and delete this agents using bulk operation'
|
||||
tickets_associated = [3831]
|
||||
|
||||
|
||||
def test_pan2(self):
|
||||
driver = self.driver
|
||||
login(driver,"admin","pandora",self.base_url)
|
||||
login(driver)
|
||||
detect_and_pass_all_wizards(driver)
|
||||
click_menu_element(driver,"Agent detail")
|
||||
driver.find_element_by_id("submit-crt").click()
|
||||
driver.find_element_by_id("text-agente").click()
|
||||
driver.find_element_by_id("text-agente").clear()
|
||||
driver.find_element_by_id("text-agente").send_keys("prueba masivas 1")
|
||||
driver.find_element_by_id("submit-crtbutton").click()
|
||||
|
||||
create_agent(driver,"prueba masivas 1")
|
||||
|
||||
#click_menu_element(driver,"Agent detail")
|
||||
#driver.find_element_by_id("submit-crt").click()
|
||||
#driver.find_element_by_id("text-agente").click()
|
||||
#driver.find_element_by_id("text-agente").clear()
|
||||
#driver.find_element_by_id("text-agente").send_keys("prueba masivas 1")
|
||||
#driver.find_element_by_id("submit-crtbutton").click()
|
||||
|
||||
driver.find_element_by_css_selector("b").click()
|
||||
click_menu_element(driver,"Agent detail")
|
||||
driver.find_element_by_id("submit-crt").click()
|
||||
driver.find_element_by_id("text-agente").click()
|
||||
driver.find_element_by_id("text-agente").clear()
|
||||
driver.find_element_by_id("text-agente").send_keys("prueba masivas 2")
|
||||
driver.find_element_by_id("submit-crtbutton").click()
|
||||
|
||||
create_agent(driver,"prueba masivas 2")
|
||||
|
||||
#click_menu_element(driver,"Agent detail")
|
||||
#driver.find_element_by_id("submit-crt").click()
|
||||
#driver.find_element_by_id("text-agente").click()
|
||||
#driver.find_element_by_id("text-agente").clear()
|
||||
#driver.find_element_by_id("text-agente").send_keys("prueba masivas 2")
|
||||
#driver.find_element_by_id("submit-crtbutton").click()
|
||||
|
||||
driver.find_element_by_css_selector("b").click()
|
||||
driver.find_element_by_css_selector("b").click()
|
||||
click_menu_element(driver,"Agents operations")
|
||||
|
@ -44,7 +54,6 @@ class PAN2(PandoraWebDriverTestCase):
|
|||
self.assertEqual(self.driver.find_element_by_xpath('//div[@id="main"]//td[contains(.,"Successfully deleted (2)")]').text,"Successfully deleted (2)")
|
||||
except AssertionError as e:
|
||||
self.verificationErrors.append(str(e))
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue