UI Automation hoyo encontrado

1, ElementNotInteractableException: Mensaje: elemento no interactable

La solución es utilizar XPath posicionado, a continuación, js elemento operativo, o similares clics

service_ticket_list = self.get_element ( ' service_ticket_list ' ) 
self.driver.execute_script ( " argumentos [0] .click (); " , service_ticket_list)

2, un problema time.sleep

Si otra capa de código más la time.sleep (5), método tearDown UNITEST también quieren añadir time.sleep (5), de lo contrario no habrá conflictos

3, insuficiencia tomado problema de verificación de código

Resolución del sistema informático se establece en 100% sin ningún problema

4, no puede obtener el valor de la propiedad requiere el uso de .get_attribute ( "href") directamente con XPATH

objeto elemento de preferencia y, a continuación, obtener el valor get_attribute

xpath_urls = ' // div [@ class = "qg-límite-list"] / a ' 
urls_pre = browser.find_elements_by_xpath (xpath_urls) 
url = urls_pre [0] .get_attribute ( " href " )

5, unittest "ResourceWarning: no cerrada <socket.socket fd = 864, la familia = AddressFamily.AF_INET ..." 解决 办法

Importación Representa advertencias 
warnings.simplefilter ( " Omitir " , ResourceWarning) # método add instalación

 

6, Elemento: ElementClickInterceptedException

方法一: 

elemento = driver.find_element_by_css ( ' div [clase * = "loadingWhiteBox"] ' ) 

driver.execute_script ( " argumentos [0] .click (); " , elemento) 

方法二: 

elemento = driver.find_element_by_css ( ' div [clase * = "loadingWhiteBox"] ' ) 

webdriver.ActionChains (conductor) .move_to_element (elemento) .click (elemento) .Realizar ()

 

7, objeto 'AdminLoginCase' no tiene atributo 'test_login_case'

problemas de cursor del ratón cuando se ejecutan determinados clics del ratón sobre la parte inferior

Supongo que te gusta

Origin www.cnblogs.com/lvchengda/p/12627394.html
Recomendado
Clasificación