I m trying to pass values of string to find_element_by_Xpath() to get the search and match for the part of value of attribute. How do I get this working?
I have tried it on Python3.7 and selenium library, Can't find a way to pass value from loop. I was trying with the following but doesn't work
datasets = [ 'ds_pos_retail_outlet','ds_pos_retail_fullset', 'ds_pos_retail_ProfitCenter','ds_pos_retail_Section']
for x in datasets :
refreshNow= driver.find_element_by_xpath('//button[starts-with(@aria-describedby, x) and @title="Refresh now"]')
refreshNow.click()
time.sleep(8)
I want to select and click a node with property value as passed with regex match