Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If page does not exist - skip go to another action
#1
Not Solved
Hi all

My web app handles differently depending on the input.

If input is "Company type A" then page 1,2,3,4,5 is shown in the flow (you navigate from each page by pressing next).

If input is "Company type B" then page 1,2,4,5 is shown thus skipping page 3.

How do i handle this without having to have to seperate scripts, one for each company type ?
Reply
#2
Not Solved
Hi
Can you pls tell me what exactly you have to do on pages?
If you are stuck in clicking next button (If next button is disabled for 4th time in 2nd condition) or accessing the particular page?
Reply
#3
Not Solved
I have one action for each page in my Web app called ActionPage1, ActionPage2 ...etc.

All pages (actions) except last page have Next buttons, and thats the problem, because if the script clicks next, the script "thinks" that the next page is 3, but its actually 4. What i need the script to do is:

1. Identify the page, could be by checking if a specific text exists
2. If text exists (meaning page 3 is not skipped), the script should perform as usual on page 3 (could be verify text).
3. If text does not exist (meaning page 3 is skipped), the script should ignore the code on page 3 and perform the code of page 4 (ActionPage4)
Reply
#4
Not Solved
Then try this,
Code:
For i= 1 To MaxCount
' use any property value, i have taken text to describe here for example
If (Browser().Page().WebButton("text:=Next").Exists(0)) Then
     Browser().Page().WebButton("text:=Next").Click
   ' Here do what ever you want
   ' Call the "actionPage"&i >> here you can use i to call the particular action.
End If
Reply
#5
Not Solved
Simply record the script and then handle it through if -else

for example

if company a
then add the statements & actions of company a [copy paste by already recorded script]
if company b

then add the statements & actions of company b [copy paste by already recorded script]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,851 02-08-2019, 02:12 AM
Last Post: Ankur
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,640 02-07-2017, 12:28 AM
Last Post: sparkwanted
  how to find Excel file exist or not in vbscript code sree.85 3 11,240 08-22-2013, 11:42 AM
Last Post: akhandesh
  Remote server machine does not exist eroshan 5 14,229 05-06-2013, 06:03 PM
Last Post: Saket
  Difference between parameter tabs in Action Properties and Action Call Properties. vibhakhandelwal 0 4,041 11-16-2011, 01:34 PM
Last Post: vibhakhandelwal

Forum Jump:


Users browsing this thread: 1 Guest(s)