简体   繁体   English

无法点击docusign文档

[英]cannot click on docusign document

I need help.我需要帮助。 I am trying to automate a form using selenium ( Java ) which has been built in salesforce and the docusign has embedded into it.我正在尝试使用 selenium ( Java ) 自动化表单,该表单已在 salesforce 中构建并且文档已嵌入其中。 whenever i try to click a button on the docusign page i get the error : unable to locate the element or no such element found.. i have tried everything by using all types of wait commands ( waituntil element visible/ clickable etc., ) but still no luck can you please advise is there a way to click on the embed docusign page ?每当我尝试单击 docusign 页面上的按钮时,我都会收到错误消息:无法找到该元素或找不到这样的元素。仍然没有运气,你能告诉我有没有办法点击嵌入文档页面? Appreciate your help!!感谢你的帮助!!

I am new to this forum please accept my apologies if i put anything wrong.. Thanks我是这个论坛的新手,如果我说错了什么,请接受我的道歉..谢谢

Just to be sure, check if the docusign is in the same frame.为了确定,请检查文档是否在同一帧中。 I have tested in salesforce before and we used to have iframes.我之前曾在 salesforce 中进行过测试,我们曾经有过 iframe。 Then you need to tell selenium to switch frames in order to find the elements.然后你需要告诉 selenium 切换帧以找到元素。

If that is the case, use:如果是这种情况,请使用:

driver.switchTo().frame() 

This is how i have solved my problem.这就是我解决我的问题的方法。

driver.switchTo().frame( driver.findElement( By.xpath( iframeXpath ) ) ); driver.switchTo().frame(driver.findElement(By.xpath(iframeXpath)));

and then return to the top window: driver.switchTo().defaultContent();然后返回顶部窗口: driver.switchTo().defaultContent();

Thanks谢谢

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

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