nramesh
11 years agoOccasional Contributor
Guidance on VB automation scripting
My Web based application is undergoing an automation testing phase. How can i counter writing scripts in VB for the following scenario.The application will have 3 webpages A,B & C that run sequentially one after the other. However the page B gets loaded/appears only during certain circumstances. Under this condition, how will my approach be to write a single VB script having both the below applicable conditions:
After Page A -> If Page B exists -> then proceed to Page C
and
After Page A -> If Page B doesnot exist -> contiue and proceed to Page C
I was wondering if the event handlers tab would work for the above criterion? Would appreciate it if i can get guidance on the approach to be taken with an script structure for the above coding.
Thank you in advance!
After Page A -> If Page B exists -> then proceed to Page C
and
After Page A -> If Page B doesnot exist -> contiue and proceed to Page C
I was wondering if the event handlers tab would work for the above criterion? Would appreciate it if i can get guidance on the approach to be taken with an script structure for the above coding.
Thank you in advance!
- I think it would be more like this... again, Pseudocode
PageA.ClickLink()
if (application.waitAliasChild("PageB", 3000).Exists then
PageB.ClickRadio()
PageC.DoAction;
Essentially, all you need to do is through in a check after you click the link on PageA to see if PageB comes up within a specified period fo time.