正在使用一个chrome pligin插件,可以进行文章识别与迁移,大概例子如下:

现在我希望对这个弹窗进行自动化操作,比如公众公开选为不公开、填入标签。
对应的页面源码大概如下:
<html data-kumuhana="default" style="">
<head>
</head>
<body>
<div id="yuque-extension-root-container" class="yuque-extension-root-container-class"></div>
<div class="ne-overlay-container" data-event-boundary="overlay"></div>
<iframe id="loginIframe" src="chrome-extension://hpdmagfinfjkljobgngfeecfglalnfpk/ifr.html"
style="position: fixed; width: 470px; height: 580px; z-index: 2147483647; border-width: 0px; right: 12px; top: 8px;"
uia-uid="0|1"></iframe>
</body>
<div class="q1lywv9tsefewq"></div>
</html>这个iframe中的元素:

但是当我通过代码进行操作时,提示无法获取到该元素。
以下2种办法我都尝试过:
https://www.yingdao.com/community/detaildiscuss?id=bf2e4a36-76cd-4903-a2c8-91931a0eca8b
(代码版本与应用市场版本都试过)
https://www.yingdao.com/community/detaildiscuss?id=d052b6ef-72d7-4e9b-a794-966844fec2ea
(这个方法是我一直在用的,在其他正常iframe页面用了都是正常的,唯独在本例子中不行)。
我代码的基本逻辑如下:
尝试过的方案1(指令市场的iframe2库):
// 真实效果需要安装一个chrome插件:http://www.360doc.com/helpnew.html,然后博客园、简书啥的随便找个文章都能剪辑
wb = xbot.web.create(url="https://blog.csdn.net/qq_39516859/article/details/80068910", mode=BROWSER)
xbot.sleep(5)
// 设置一个插件启动快捷键并启动
xbot_visual.win32.send_keys(keys="+#{o}", hardware_driver_input=False, force_ime_eng=False, contains_hotkey=True, send_key_delay="50", delay_after="1",
_block=("main", 3, "mac:shift+cmd+g")) # mac
xbot.sleep(5)
coll_iframe = et.iframe2.init_iframe(wb)
iframe_page = et.iframe2.to_iframe(coll_iframe, "//*[@id='loginIframe']", True, 3)
// 报错:xbot.errors.UIAError: Message:未找到元素, 元素名: iframe
copyright_btn = iframe_page.find_ele('//div[@id="divmypremi"]')
// 报错堆栈信息:
// File "...xbot_extensions/iframe2/__init__.py", line 33, in to_iframe
// return xbot_visual.process.run(process="xbot_extensions.iframe2.to_iframe",package=__name__,inputs=inputs, outputs=outputs)
// File "<string>", line 89, in wrapper
// File "<string>", line 84, in wrapper
// File "<string>", line 82, in run
// File "...xbot_extensions/iframe2/to_iframe.py", line 25, in main
// }, _block=("A1-切换iframe", 1, "调用模块"))
// File "<string>", line 89, in wrapper
// File "<string>", line 84, in wrapper
// File "<string>", line 37, in invoke_module
// File "...xbot_extensions/iframe2/_core.py", line 25, in wrapper
// res = func(*args, **kwargs)
// File "...xbot_extensions/iframe2/api.py", line 12, in to_iframe
// return iframe_instance.to_iframe(iframe_xpath, current_global, timeout=timeout)
// File "...xbot_extensions/iframe2/_core.py", line 120, in to_iframe
// return self.find_ele(xpath, True, current_global, timeout=timeout)
// File "...xbot_extensions/iframe2/_core.py", line 44, in wrapper
// return func(*args, **kwargs)
// File "...xbot_extensions/iframe2/_core.py", line 185, in find_ele
// self.find_all_iframe(iframe_page_list)
// File "...xbot_extensions/iframe2/_core.py", line 113, in find_all_iframe
// iframe_page_list = self.find_all_ele("//iframe|//frame", True)
// File "...xbot_extensions/iframe2/_core.py", line 58, in wrapper
// return func(*args, **kwargs)
// File "...xbot_extensions/iframe2/_core.py", line 264, in find_all_ele
// ele = self.web_page.find(xbot.selector.Selector(value), timeout=0)
// File "<string>", line 540, in find
//xbot.errors.UIAError: Message:未找到元素, 元素名: iframe尝试过的方案2:
// 真实效果需要安装一个chrome插件:http://www.360doc.com/helpnew.html
wb = xbot.web.create(url="https://blog.csdn.net/qq_39516859/article/details/80068910", mode=BROWSER)
xbot.sleep(5)
// 设置一个插件启动快捷键并启动
xbot_visual.win32.send_keys(keys="+#{o}", hardware_driver_input=False, force_ime_eng=False, contains_hotkey=True, send_key_delay="50", delay_after="1",
_block=("main", 3, "mac:shift+cmd+g")) # mac
xbot.sleep(5)
coll_iframe = SuperXpath(wb).find("//iframe[@id='loginIframe']", timeout=3)
// 这里会找不到元素://div[@id="divmypremi"]
copyright_btn = SuperXpath(coll_iframe).find('//div[@id="divmypremi"]', timeout=3) 尝试过的方案1与方案2放在上面,这个尝试过的方案文本框校验好像有点bug,没有满500字也会提示