Forum Discussion

Azeddin_Margani's avatar
Azeddin_Margani
Contributor
2 years ago
Solved

Passing of ImageRepository name or item from excel

 Hi all, 

Could someone please tell me how to pass ImageRepository name and or item from excel sheet. 

e.g.

ImageRepository.name.item

or

passing both name and item for use in JavaScript. 

 

Many Thanks.

AM.

 

 

 

  • AlexKaras's avatar
    AlexKaras
    2 years ago

    Hi,

     

    Try something like this:

    var strItemFullName = 'Imagerepository.imageset.item';

    var Button = eval(strItemFullName);
    Button.Click;

     

    Does this help?

     

  • Hi AlexKaras, 

     

    The use of eval() proven to be working before converting the passed parameter to a string. 

     

    Many Thanks,

     

5 Replies

    • Azeddin_Margani's avatar
      Azeddin_Margani
      Contributor
      Hi Marsha,

      Please note i'm referring to the imageset.item of an image name that has already been saved in the image repository as (PaymentButton.Payment) where:
      Imageset is: PaymentButton
      Item is: Payment.

      The piece of code to execute is.

      Var Button =Imagerepository.imageset.item;
      Button.Click;

      I need to parametrize imageset and item so that it can be used on any image saved in the imagerepository. I tried to pass both imageset and item from excel but it doesn't seem to work.

      Please provide me with an example on how this can be done.

      Thanks.
      AM.
      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Try something like this:

        var strItemFullName = 'Imagerepository.imageset.item';

        var Button = eval(strItemFullName);
        Button.Click;

         

        Does this help?