def testLogin(self): self.testname="testLogin" self.setup() util = WebdriverUtilities() util.setDriver(self.driver) element = Elements() do = Helpers() do.setUtils(util) do.Login() self.assertTrue(util.isElementPresent(element.dashboard_title), "no dashboard page found")
def testJasmineExample(self): self.setup_jasmine() util = WebdriverUtilities() util.setDriver(self.driver) element = Elements() do = Helpers() do.setUtils(util) util.waitForElementToBePresent(element.jasmine_results) self.assertTrue(util.isElementPresent(element.jasmine_results), "no results on the page found")
def testPolicyCreate(self): self.testname="testPolicyCreate" self.setup() util = WebdriverUtilities() util.setDriver(self.driver) element = Elements() do = Helpers() do.setUtils(util) do.Login() last_created_object_link =do.CreateObject("Policy") do.NavigateToObjectAndOpenObjectEditWindow("Policy",last_created_object_link) do.deleteObject()
def testControlEdit(self): self.testname="testControlEdit" self.setup() util = WebdriverUtilities() util.setDriver(self.driver) element = Elements() do = Helpers() grcobject = GRCObject() do.setUtils(util) do.Login() last_created_object_link = do.CreateObject("Control") object_name = util.getTextFromXpathString(last_created_object_link) do.NavigateToObjectAndOpenObjectEditWindow("Control",last_created_object_link) do.PopulateObjectInEditWindow( object_name , grcobject.control_elements, grcobject.control_values) do.ShowHiddenValues() do.verifyObjectValues( grcobject.control_elements, grcobject.control_values) do.deleteObject()
def testRiskCreate(self): self.testname = "testRiskCreate" self.setup() util = WebdriverUtilities() util.setDriver(self.driver) element = Elements() do = Helpers() do.setUtils(util) do.Login() self.assertTrue(util.isElementPresent(element.dashboard_title), "no dashboard page found") do.OpenCreateNewRiskWindow(element.risk_widget_object_add_button) random_number = do.GetTimeId() risk_name = "risk-auto-test" + random_number do.PopulateNewObjectData(risk_name) do.SaveObjectData() do.WaitForLeftNavToLoad() do.VerifyObjectIsCreated("risks", risk_name)