Contributions
Underorder list is getting null when try to run from TestComplete Execution plan.
I have an application where I click on the 'Create New button and then it populates the Unordered list. I am calling the script routine which contains code for the above actions in multiple keywords Test. When I am running these tests individually, the list is populating as expected but when I am running the keyword test from the execution plan, at first Keyword Test run the list is not null but at subsequent runs, the undordered list is getting null. Here is my code function ClickCreateNewAuth(HP){ try{ var btnCreateNew = Wait.findObject("//button[contains(text(),'Create New')]"); btnCreateNew.Click(); Delay(500); var HealthPlanList = null; HealthPlanList = page.FindElements("//div[@class='dropdown dropdown-custom mt-15 open']//ul[@class='dropdown-menu pull-right']/li/a"); if (HealthPlanList.length <= 0 || HealthPlanList === null) { navigateToHomePage() GoToPAS() btnCreateNew.Click(); Delay(10000); HealthPlanList = page.FindElements("//div[@class='dropdown dropdown-custom mt-15 open']//ul[@class='dropdown-menu pull-right']/li/a"); } if (HealthPlanList.length > 0) { for (var i = 0; i < HealthPlanList.length; i++) { //Log.Message(HealthPlans[i].innerText); var value = HealthPlanList[i].innerText; if(HP == value) { HealthPlanList[i].Click(); break; } } } else{ Log.Error('Health Plan List is null or '+HealthPlanList.length); } }248Views1like1Comment- 488Views0likes0Comments
- 491Views0likes1Comment
Click on Span Object not working occasionally
I have the following menus in my application When I click on 'Self Service Tool' menu or hover over it, the following submenus displays Here is my code to click on the 'Self Service Tool' submenu. var Wait = require("Wait"); var browser = Sys.Browser(); var page = browser.Page("*"); Wait.findObject("//li/a/span[contains(text(),'Self Service Tool')]").Click(); Delay(1000); Wait.findObject("//li/a/span[contains(text(),'Prior Authorization Work Queue')]").Click(); Delay(3000); ---------------------------------- function findObject(selector) { var browser = Sys.Browser(); var page = browser.Page("*"); var obj = page.WaitElement(selector,1000); while (obj.Exists == false){ obj = page.WaitElement(selector,1000); } return obj; } The click on the 'Self Service Tool' object occasionally not working. The HTML attributes of the object are shown below. In the logs, I can see Click is performed but the sub-menu list is not populatingSolved540Views0likes5Comments