0
在Robot Framework中执行关键字“运行关键字并期望错误”时,我正面临以下问题。Robot Framework运行关键字和期望错误
首先我尝试这样做:
run keyword and expect error InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated Input Text ${indFNPatientHealth Link} RCIGM_FN
,它失败了。该追溯是:
17:44:01.894 FAIL InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated
(Session info: chrome=60.0.3112.101)
(Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)
17:44:01.894 FAIL Expected error 'InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated' but got 'InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated
(Session info: chrome=60.0.3112.101)
(Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)
'.
所以我修改了预期的错误复制全文包括会话信息和驾驶员信息。更新的代码是:
run keyword and expect error InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated \ \ (Session info: chrome=60.0.3112.101) \ \ (Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64) Input Text ${indFNPatientHealth Link} RCIGM_FN
而且它又失败了。
17:31:59.291 FAIL InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated
(Session info: chrome=60.0.3112.101)
(Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)
17:31:59.291 FAIL Expected error 'InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated (Session info: chrome=60.0.3112.101) (Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)' but got 'InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated
(Session info: chrome=60.0.3112.101)
(Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)
在此先感谢您的支持解决此问题。
感谢。它工作完美 – nhrcpt