[英]How to handle print preview in Firefox using selenium robot framework
I am trying to tap on the 'cancel' option in the print preview page in Firefox.我正在尝试点击 Firefox 打印预览页面中的“取消”选项。 But unfortunately, I am not able to inspect the element on right clicking on the cancel option.
但不幸的是,我无法通过右键单击取消选项来检查元素。 I was able to inspect in chrome though and was able to see the shadow root element.
不过,我能够在 chrome 中进行检查,并且能够看到阴影根元素。 The following code worked perfectly for chrome, but not working in firefox.
以下代码适用于 chrome,但不适用于 Firefox。
switch window NEW
execute javascript ${cancel_link}.click()
where ${cancel_link} is the shadow root element pointing to the "cancel option"
Seems like there is no direct answer for the above scenario in selenium.硒中的上述情况似乎没有直接答案。 Had to use "rpaframework" library to enter the "tab key" and finally reach the desired option in the print preview page.
不得不使用“rpaframework”库来输入“tab键”,最后在打印预览页面中到达所需的选项。
https://robocorp.com/docs/libraries/rpa-framework/rpa-desktop/keywords https://robocorp.com/docs/libraries/rpa-framework/rpa-desktop/keywords
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.