[英]How do I select the Last Name element on Microsoft CRM form that has the name <input id = “lastname_i”…> using Python selenium driver?
I have no clue why my CRM driver is not catching this below HTML
element. 我不知道为什么我的CRM驱动程序没有在HTML
元素下面捕获这个。 I have tried using absolute and relative XPath, tried using webdriver.get_element_by_id('lastname_i')
, get_element_by_css_selector('input.lastname_i')
, and many more scripting possibilities. 我尝试过使用绝对和相对XPath,尝试使用webdriver.get_element_by_id('lastname_i')
, get_element_by_css_selector('input.lastname_i')
以及更多脚本编写的可能性。 For whatever reason, the webdriver does not find this element. 无论出于何种原因,webdriver都找不到这个元素。
Can anyone help me with the correct Python script? 任何人都可以帮助我使用正确的Python脚本吗? I think it has something to do with the fact there is no />
in the HTML element I am trying to find. 我认为这与我想要找到的HTML元素中没有/>
的事实有关。
<div class="ms-crm-Inline-Edit ms-crm-Inline-HasError"><input id="lastname_i" attrname="lastname" attrpriv="create, read, update" maxlength="50" title="" class="ms-crm-InlineInput" controlmode="alwaysedit" style="ime-mode: active;" aria-invalid="true" type="text"></div>
等待20
秒,然后尝试以下代码。
webdriver.get_element_by_xpath("//input[@id='lastname_i']")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.