Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Rise™.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Cloud Services
AWS
Azure
Google Cloud
Salesforce
Microsoft
SAP
October 9, 2023
I’m trying to use contains function on selenium and trying to do a certain action if that specific text exists and click on it.
How to use contains function with driver.find_element(). So far I tried:
testData = "Test" if testData in element.text: driver.find_element(By.LINK_TEXT, contains({testData})).click() else: print(f"The element does not contain the text: {testData}.")