|
用watir-webdriver运行脚本时,提示如下: unknown error: Element is not clickable at point (411, 83). Other element would receive the click: <div tabindex="-1" class="ant-modal-wrap common-login-dialog" role="dialog">...</div> (Selenium::WebDriver::Error::UnknownError)
源码如图1所示。目的是点击弹窗的“登录”按钮,脚本如下:
当运行到第四行时,弹窗总是自动切换到注册,而我的目的是登录,运行第五行点击登录时就爆出上述错误,不知道是哪里的问题,刚开始学习自动化测试,还请多多指教啊~
- require 'watir-webdriver'
- b = Watir::Browser.new:chrome
- b.goto('http://120.26.130.253:3000/course/questionstore?_v=0.2.2&course_id=355')
- b.div(:class,"header-part float-right").click
- b.div(:class=>"ant-tabs-tab-inner").click
复制代码
|
|