I am doing a selenium automation where I want to pass the variable into the XPath and select the element.
The xpath which I am trying looks like:
browser.find_element_by_xpath("//span[contains(.,'SEM W880 Black')]")
I would like to pass the text SEM W880 Black
as a variable to the XPath. How can I do it using python 3?