Forum Discussion
lordsivan
13 years agoOccasional Contributor
Here are few suggestion
1. The Sys based alias is very fragile. Very soon, you would end up with code that is not maintainable
2. Click based on co-ordinates is also fragile.. do not use them.
3. You got to wait for the page to load completely.
TestCase:- http://www.appcrowdtest.com:8082/issues/2
TestComplete Test code:- http://www.appcrowdtest.com:8082/issues/4
TestReport:-http://www.appcrowdtest.com:8082/issues/3
Hope it helps. For the below code to work you need complete project
Here is my script that take care of both the issues
function TestRunScript()
{
//The beginning of the Step-1 Goto the website group
Log.Message("Launch Browser", "");
Browsers.Item(btIExplorer).Run("");
Browsers.Item(btIExplorer).Navigate("https://www.clublocal.com/");
//The end of the Step-1 Goto the website group
//The beginning of the Step-2 Click Reviews group
Log.Message("Click Review", "");
Aliases.Browser.Page_ClubLocal.Panel_Header.Panel_Menu.Link_Reviews.Click();
//The end of the Step-2 Click Reviews group
//The beginning of the Step-3 Click Review Catergory group
Log.Message("Wait for page to load", "");
Delay(5000);
WaitForObjectToAppear(50000, Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Right, "Page load failed");
clickLink("Heating & Air Conditioning", Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Right);
//The end of the Step-3 Click Review Catergory group
//The beginning of the Step-4 Click older group
Log.Message("Click The older", "");
Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Pagination.Panel_Older.Click();
//The end of the Step-4 Click older group
//The beginning of the Step-5 Click Newer group
Log.Message("Click Newer", "");
Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Pagination.Panel_Prev.Click();
//The end of the Step-5 Click Newer group
}
1. The Sys based alias is very fragile. Very soon, you would end up with code that is not maintainable
2. Click based on co-ordinates is also fragile.. do not use them.
3. You got to wait for the page to load completely.
TestCase:- http://www.appcrowdtest.com:8082/issues/2
TestComplete Test code:- http://www.appcrowdtest.com:8082/issues/4
TestReport:-http://www.appcrowdtest.com:8082/issues/3
Hope it helps. For the below code to work you need complete project
Here is my script that take care of both the issues
function TestRunScript()
{
//The beginning of the Step-1 Goto the website group
Log.Message("Launch Browser", "");
Browsers.Item(btIExplorer).Run("");
Browsers.Item(btIExplorer).Navigate("https://www.clublocal.com/");
//The end of the Step-1 Goto the website group
//The beginning of the Step-2 Click Reviews group
Log.Message("Click Review", "");
Aliases.Browser.Page_ClubLocal.Panel_Header.Panel_Menu.Link_Reviews.Click();
//The end of the Step-2 Click Reviews group
//The beginning of the Step-3 Click Review Catergory group
Log.Message("Wait for page to load", "");
Delay(5000);
WaitForObjectToAppear(50000, Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Right, "Page load failed");
clickLink("Heating & Air Conditioning", Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Right);
//The end of the Step-3 Click Review Catergory group
//The beginning of the Step-4 Click older group
Log.Message("Click The older", "");
Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Pagination.Panel_Older.Click();
//The end of the Step-4 Click older group
//The beginning of the Step-5 Click Newer group
Log.Message("Click Newer", "");
Aliases.Browser.Page_ClubLocal.Page_Reviews.Panel_Pagination.Panel_Prev.Click();
//The end of the Step-5 Click Newer group
}