【问题标题】:Unable to click on a Button(Its says element with locator is not visible)无法单击按钮(它说带有定位器的元素不可见)
【发布时间】:2022-06-10 20:09:28
【问题描述】:

我想在 Frame 中选择一个按钮 .. 但是有些它没有选择..尝试下面的代码切换到框架并使用TypeScript单击量角器中的元素..

await browser.switchTo().frame(element(by.xpath("//div[@id='main-container']")).getWebElement()); 
await this.element(by.css('.uploadDiv #uploadP')).click(); --> Did not work

let frame3 = element(by.xpath("//div[@id='main-container']")).getWebElement();
        browser.switchTo().frame(frame3); 
await this.element(by.css('.uploadDiv #uploadP')).click(); --> Did not work

enter image description here

【问题讨论】:

  • 添加了上面的元素图片

标签: typescript selenium-webdriver protractor


猜你喜欢
  • 2017-10-15
  • 1970-01-01
  • 2016-10-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-22
  • 2016-08-01
相关资源
最近更新 更多