Javascript 如何设置元素的值?
我想用数字填充应用程序中的元素 从appium我知道我想填写:Javascript 如何设置元素的值?,javascript,node.js,appium,Javascript,Node.js,Appium,我想用数字填充应用程序中的元素 从appium我知道我想填写: element: aaa/edit_input_activation_code_first attribute: text value: 5 numbers eg.: 12345 我使用下面的代码在屏幕之间移动 it("should find an element", function() { return driver .elementById('aaa/btn_registration_wizard_fragm
element: aaa/edit_input_activation_code_first
attribute: text
value: 5 numbers eg.: 12345
我使用下面的代码在屏幕之间移动
it("should find an element", function() {
return driver
.elementById('aaa/btn_registration_wizard_fragment_type_code')
.should.eventually.exist
});
it("should find click element", function() {
return driver
.elementById('aaa/btn_registration_wizard_fragment_type_code')
.click()
});
我想用数字填充4个元素,然后转到下一个屏幕。如果要向文本元素发送一些键,应使用该方法:
let element = await driver.elementById("aaa/edit_input_activation_code_first");
await element.type("12345")