硒:硒如何识别可见元素?是否可以将其加载到DOM中但不能在UI上呈现? [英] Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI?

查看:144
本文介绍了硒:硒如何识别可见元素?是否可以将其加载到DOM中但不能在UI上呈现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 硒:硒如何识别可见元素或不可见元素?是否可以将其加载到DOM中但不能在UI上呈现? 我想验证一个元素可单击的情况,我知道Web驱动器具有方法"ElementToBeClickable",但是,我想知道内部的工作方式.请帮助我.
  2. 此外,如何处理将元素加载到DOM中但UI显示加载正在进行中的情况,如何等待完整加载?
  3. 请让我知道,如果未加载UI,则硒将直接调用DOM元素,或者如果加载UI元素,则执行将失败吗?对此,我将不胜感激.
  1. Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI? I would like to verify a scenario where element is clickable, I know web drive has method "ElementToBeClickable" however, I would like to know the inner working. Please help me on this.
  2. Also,how to handle a scenario where the element is loaded in the DOM but UI shows loading in progress, how to wait for complete load?
  3. Please let me know, if the UI is not loaded then will selenium directly call the DOM element or if UI element is being loaded then it will fail the execution? I would really appreciate more technical explanation on this.

推荐答案

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆