Forum Discussion

Azeddin_Margani's avatar
Azeddin_Margani
Contributor
9 years ago

Insert variables in a dynamic URL

Hi,

 

Could someone help, please - I'm trying to code URL that has got dynamic variables?.

 

The mapping name is:

Aliases.browser.Page("https://www.busstage.com/regionaltickets/west-area/London/megarider").Panel(0).Panel(3).Panel(0).Panel(0).Panel(3).Panel(0).Panel(1).Panel(2).Panel(0).Panel(0).Panel(0)

 

Knowing that, west-area and  London are dynamic. 

 

I've tried the following code but is not working:

var Var1 = DDT.CurrentDriver.Value("Location"); //location is passed from spreadsheet.

 

Aliases.browser.Page("https://www.busstage.com/regionaltickets/?*/@Var1/megarider").Panel(0).Panel(3).Panel(0).Panel(0).Panel(3).Panel(0).Panel(1).Panel(2).Panel(0).Panel(0).Panel(0)

 

Regards,

A.M.