How to give test URL to my framework

    1
    15
    Spread the love
    • 1
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
      1
      Share



    This section is dedicated to my viewers.Here they can ask question and I will be happy to help or redirect to some page what is best suitable for them. 

    Hi Animesh
    How to change/give environment name dynamically to my framework? .Right now we are hardcoding in our scripts.

    Regards
    Veenetha

    Hi Veenetha,
    Thank you very much for writting me!! I am trying my level best to solve your query.

    Well veenetha,there are several ways how you can insert environment name into your framework:—-
    1)Ofcourse,I agree,the hardcoding into a script is one of the options.
     String  URL=”www.abc.com
    2)The second improvement could be,you can create a dialog box(input to take the environment.This you will place master/global driver and the value you will pass to the child scripts.

    Or,you get the URL from user and save it to the notepad and read it dynamically afterwords.
    3)Create an environment file for providing URL.I found advantage on creating a separate file for environment details.Updation is very easy and effective.
    Say active_URL=”google.com
    Tomorrow you can change it to
      active_URL=”yahoo.com
      active_URL=”google.com


    My personal suggestion is to go with either 2 or 3.

    Don't miss out!
    Subscribe To Newsletter

    Receive top technical news, lesson ideas, travel tips and more!

    Invalid email address
    Give it a try. You can unsubscribe at any time.

    Spread the love
    • 1
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
      1
      Share

    1 COMMENT

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here