我在混合应用程序上使用排毒。我想在本机代码中使用 by.id
目前我正在这样登录:
try {
// 'Email address' is the input's placeholder text
await waitFor(element(by.text('Email address')).atIndex(0))
.toBeVisible()
.withTimeout(TIMEOUT);
await expect(element(by.label('Email address')).atIndex(0)).toBeVisible();
await element(by.label('Email address')).atIndex(0).typeText(config[email].email);
} catch (err) {
// Email addresses get cached, so you won't find the text 'Email address' after the first login
} finally {
await element(by.label('Password')).atIndex(0).typeText(devConfig[email].password);
await element(by.label('Sign in')).atIndex(0).tap();
}
我想做这样的事情。
await element(by.id('email')).typeText(devConfig[email].password);
await element(by.id('password')).typeText(devConfig[email].password);
await element(by.id('login')).tap();
如何将 id 添加到本机 ios 输入?