【问题标题】:Button on the dialog box was unable to click or choose in Protractor对话框上的按钮无法在量角器中单击或选择
【发布时间】:2020-03-01 09:54:36
【问题描述】:

dialog box无法在量角器中获得“启动新应用程序”按钮。该脚本未检索到启动新应用程序按钮的 ID

it("test the modal dialog button", function() {[code for the dialog box][2]

browser.waitForAngularEnabled(false);
browser.get("URL given");


expect(element(by.cssContainingText('.ng-star-inserted','2')).isPresent()).toBeFalsy();
expect(element(by.cssContainingText('#button-primary','Back to home')).isPresent()).toBeTruthy();


element(by.buttonText('resend')).click; 
browser.wait(3000);
element(by.cssContainingText('button-primary','Back to home')).click();                 

一旦选择启动新应用程序或单击。需要加载新页面或 URL

【问题讨论】:

  • 请提供无法点击的按钮的html

标签: javascript angular typescript protractor material-design


【解决方案1】:

你忘记了这一行的括号

element(by.buttonText('resend')).click;

应该是这样的

element(by.buttonText('resend')).click();

【讨论】:

    猜你喜欢
    • 2021-09-16
    • 2022-10-16
    • 1970-01-01
    • 2020-08-22
    • 1970-01-01
    • 2017-12-08
    • 1970-01-01
    • 2019-01-30
    • 2020-01-26
    相关资源
    最近更新 更多