07-28-2014, 07:35 PM
hi Below is My Code snippit..
I'm trying to Run this Part of code But Not able to Proceed Further Because of Recovery Scenario
For PoP up we are clicking Escape with Recovery scenario and i'm trying to Verify one Link Existance in Page. But First Existince link is checking and after some time it's Clicking Esc for PoP up. Because of this my scenario is getting failed
Please help me in this ...
My Recovery has to Repete same step . But it's repeating Last step Browser().Back
I'm trying to Run this Part of code But Not able to Proceed Further Because of Recovery Scenario
For PoP up we are clicking Escape with Recovery scenario and i'm trying to Verify one Link Existance in Page. But First Existince link is checking and after some time it's Clicking Esc for PoP up. Because of this my scenario is getting failed
Please help me in this ...
My Recovery has to Repete same step . But it's repeating Last step Browser().Back
Code:
Dim Count
with Browser("opentitle:=.*").page("title:=.*").WebElement("class:=box-content","html tag:=DIV")
For i = 0 To noOfAddToCartbuttons-1 Step 1
.Image("html tag:=IMG","image type:=Image Link","name:=Image","index:="&i).Click
Browser("opentitle:=.*").page("title:=.*").link("html tag:=A","name:=Description.*").Click ' PoP Up Triggers here
If Browser("opentitle:=.*").page("title:=.*").link("html tag:=A","name:=Related Products.*").Exist(1) then
With Browser("opentitle:=.*").page("title:=.*").link("html tag:=A","name:=Related Products.*")
Reporter.ReportEvent micPass,"Related Products"," Related Product Tab Displayed with products"
.Click
Browser("opentitle:=.*").page("title:=.*").WebElement("html tag:=A","class:=button","innerhtml:=Add to Cart","index:=0").click
Call chkSuccessorwaring("shopping cart")
End with
Else
Count =Count+1
Reporter.ReportEvent micWarning,"Related Products","No Related Product Tab Displayed for"& Browser("micclass:=Browser").page("micclass:=Page").getROProperty("title")
End If
Browser("opentitle:=.*").Back
Next
print Count
End with