我'm trying to create dynamic dictionary variables. Let' s说我有 &{Day_Dropdown_Value}
,它的变量为 UK=li:nth-of-type(5)
和 AU=div:nth-of-type(7)
. 我可以通过国家参数使用这个字典变量,如 &{Day_Dropdown_Value}[${COUNTRY}]
. 但实际上我想让字典的变量像 UK=li:nth-of-type(${value})
一样动态变化 . 这种情况有什么解决方案吗?
1 回答
更新了Burak评论的答案 . 您需要使用“从字典获取”来获取值