简体   繁体   English

我可以从其他窗口拖放吗? Python Selenium

[英]Can i use drag and drop from other window? Python Selenium

I want to put jpg in dropzone from other window. 我想将jpg从其他窗口放到dropzone中。 Can I do that? 我可以那样做吗? In my test I open new window (my html with jpg) and I want to drag and drop it to dropzone on my main window. 在测试中,我打开一个新窗口(带有jpg的html),然后将其拖放到主窗口的dropzone中。

I have error: Message: stale element reference: element is not attached to the page document. 我有错误:消息:过时的元素参考:元素未附加到页面文档。

Maybe there is another solution for placing this file eg from a disk? 也许还有另一种解决方案,例如从磁盘上放置此文件?

I've tried several ways, including loading from a file from the disk and sending it using send keys. 我尝试了几种方法,包括从磁盘加载文件并使用发送键发送文件。

我通过在AutoIT中创建脚本解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM