我在代码的这一部分出现错误。
try:
actionChains.double_click(driver.find_element_by_xpath("//div[4]/form/div/div").perform()
except NoSuchElementException:
actionChains.double_click(driver.find_element_by_xpath("//form/div[2]/div").perform()
如果我删除代码的第二行({{1} ), 有用。但是,如果我不这样做,那不是。任何帮助将不胜感激!
答案 0 :(得分:-1)
您应该在对// after filling half elements with 1 and half with zero
// To shuffle an array a of n elements (indices 0..n-1):
for i from n - 1 downto 1 do
j = random integer with 0 <= j <= i
exchange a[j] and a[i]
方法的调用中添加右括号:
table_name = input("Enter the Table name : ")
attribute_1 = input('Enter the First Attribute : ')
type_1 = input('Enter the type for the first attribute : ')
attribute_2 = input('Enter the Second attribute : ')
type_2= input('Enter the type for Second attribute : ')
sql1 = 'CREATE TABLE',table_name,'(',attribute_1,'',type_1,'', attribute_2,'', type_2,')'
cur.execute(sql1)
db.commit()