I am using Python Webdriver. I'm having trouble clicking the Add button. I am using Webdriver Wait, I get the following error when running my code.
Traceback (most recent call last):
File "C:\Webdriver\ClearCore 501\TestCases\AdministrationPage_TestCase.py", line 164, in test_add_Project
administration_page.add_project(project_name)
File "C:\Webdriver\ClearCore 501\Pages\admin.py", line 63, in add_project
element = wait.until(EC.element_to_be_clickable(By.XPATH, '//span[@class="gwt-InlineLabel" and contains(text(), "Projects")]/following-sibling::*/div[@class="gwt-HTML" and contains(text(), "Add...")]'))
TypeError: __init__() takes exactly 2 arguments (3 given)
My webdriver code
wait = WebDriverWait(self.driver, 60)
element = wait.until(EC.element_to_be_clickable(By.XPATH, '//span[@class="gwt-InlineLabel" and contains(text(), "Projects")]/following-sibling::*/div[@class="gwt-HTML" and contains(text(), "Add...")]'))
element.click()
What am I doing wrong? Xpath is valid as I tested it in Firefox, Firepath. He finds a button.
source
share