How to change Data File source path dynamically at runtime

I have a test case where i need to download an excel file and compare its output to a webtable.
Therefore I have create an excel data file for it and I need to dynamically change the source file path to the newly downloaded one.

How can I change the file location dynamically ?

1 Like

You need to change the path in your code dynamically or move the file on your disk to somewhere else dynamically ?

I need to change the path in my code dynamically

Can you give more details ?
Like you would click on a link, download a file, then get the location of that file ?

a- as U mentioned , I would click on a link , download a file (The file name changes every Time) that’s why I need to get the file location every time.

b- I have an existing data file which I want tochange its location to the location of step a and refresh it.

If you look at your HTML, you can probably identify the file name and get it from your testobject and use it forward.