Forum Discussion

david_bird's avatar
david_bird
Occasional Contributor
12 years ago

Button click will take me to Page B or Page C

I'm trying to create a script in which a button click on a web page will take me to one of two other web pages. Which web page the button click takes me to depends on an algorithm I have no knowledge of nor do I need to know.



Thus far I've had no success in trying things out for myself, nor can I find what I'm looking for in the Help or online.



My scenario is that I'm on Page A and click the Submit button. Depending on the algorithm this will take me to Page B where I want to do some processing OR to Page C where I want to do some other processing. As it happens a button click on Page B will take me on to Page C.



It would be very much appreciated if someone could point me in the right direction for solving this problem.



Thanks in advance.
  • Hi David,


     



    And what is the actual problem?



    If the problem is how to determine what page is shown after the Submit button is clicked, then how do you determining what page is shown after the button is clicked? Do you distinguish them by caption or some element shown? Why not to apply the same approach in the test code?


  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi David,


     



    And what is the actual problem?



    If the problem is how to determine what page is shown after the Submit button is clicked, then how do you determining what page is shown after the button is clicked? Do you distinguish them by caption or some element shown? Why not to apply the same approach in the test code?


  • david_bird's avatar
    david_bird
    Occasional Contributor
    Hi Alexei,



    Thanks for your reply.



    As you guessed the two pages can be uniquely identified.



    I'm now looking at implementing your solution. The simple use of an If...End If should do it.



    Regards,



    David.