我需要一些帮助来定位单击Office365侧面菜单中的“新建组”后出现的“创建”按钮(该按钮具有动态ID)
newgrpbutton=driver.find_element(By.XPATH, "//div[@title='New group']")
time.sleep(10)
newgrpbutton.click()
time.sleep(15)
actions=ActionChains(driver)
actions.send_keys("tstgrp1")
actions.perform()
time.sleep(20)
#it shows me an error here, Ive tried xpath too but nothing
createbutton=driver.find_elements(By.CSS_SELECTOR,".ms-Button--primary")
time.sleep(8)
actions.double_click(createbutton)
actions.perform()
time.sleep(10)
ntnow=driver.find_elements(By.CSS_SELECTOR,".ms-Button--default")
time.sleep(2)
actions.click_and_hold(ntnow)
actions.perform()