<iframe class="embedded-tax-form" scrolling="no" seamless="seamless" src="http://forms.tax-api-1w7xi0.addevcloudsites.myob.com/au-fbt-2015/1.0.0/?host=addevcloudsites.myob.com&client=deb4bb44-994f-4ce7-aea8-6507925beb8a" id="iFrameResizer1" style="overflow: hidden; height: 3971px;"></iframe>
<input id="input.ReportingParty.Identifiers.TaxFileNumber.Identifier" type="text" ng-model="form.fields['ReportingParty.Identifiers.TaxFileNumber.Identifier'].value" ng-change="run()" class="form-control ng-pristine ng-valid ng-touched" ng-readonly="form.fields['ReportingParty.Identifiers.TaxFileNumber.Identifier'].source === 'calculation'" source-selection="ReportingParty.Identifiers.TaxFileNumber.Identifier">
我在 Iframe 中嵌入了文本字段,我正在使用量角器并编写如下代码,因为最新的 protract 我们不需要实例化实例:
it('should show the functioning input directive example', function () {
browser.get('http://qa5.addevcloudsites.myob.com/tax/edit/?client=4cccbc62-15b1-41e3-a9ed-0d93e7d05db2');
// Ensure that the page is loaded before trying to switch frames.
browser.waitForAngular();
browser.switchTo().frame('embedded-tax-form');
var nameInput = element(by.model("form.fields['ReportingParty.Identifiers.TaxFileNumber.Identifier'].value"));
nameInput.sendKeys('222);
});
当我运行它时,完整的页面会刷新并说
ReferenceError:未定义 iframe NoSuchFrameError:没有这样的框架
我检查了元素是否存在于控制台上并使用了元素:
elementArrayFinder_: { getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.embedded-tax-form' },
click: [Function],
让我知道,我应该如何处理最新的量角器。如果您需要更多信息,请告诉我。