简体   繁体   English

数据:“无法反序列化 params.x - 绑定:position 47 处缺少必填字段”

[英]data: 'Failed to deserialize params.x - BINDINGS: mandatory field missing at position 47'

i'm using gauge automated ui tests with taiko integration written in javascript.我正在使用带有用 javascript 编写的 taiko 集成的仪表自动化 ui 测试。 I cant find a way to solve my problem.我找不到解决问题的方法。 Here is the error i got.这是我得到的错误。

message: 'Invalid parameters',
data: 'Failed to deserialize params.x - BINDINGS: mandatory field missing at position 47'
}
}
        Error Message: transport is closing
        Stacktrace: 

Here is my step_implementation.js file这是我的 step_implementation.js 文件

//this step works fine
step("Go to <item>", async(item) => {
    await goto(item);
    await click($(".fancybox-close-small"))
})
//this step works fine
step("Search for <item>", async(item) => {
    await click(textBox(""));
    await focus($(".pw-search-input"));
    await write(item);
})
//this step does not working, my tests fail while last step accomplished.
step("Go to Product Detail <item> By Index", async(item)=>
{ 
  click(($(".pw-autocomplete-product-suggestion").elements())[item]);  
})  

step("Select the size <item> by index", async(item)=>
{
  click(dropDown({'name':'options'}).elements()[item]);
  click(await $(".detail__add2cart"));
})

This my example.spec file这是我的 example.spec 文件

## Go to site
//lets say example.com
* Go to "example.com"
* Search for "ERKEK SPOR AYAKKABI KİNETİX"
* Go to Product Detail "1" By Index

click is an async function and hence has to be awaited, try updating the steps as below click是异步 function ,因此必须等待,尝试更新如下步骤

step("Go to Product Detail <item> By Index", async(item)=>
{ 
 await click(($(".pw-autocomplete-product-suggestion").elements())[item]);  
})  

step("Select the size <item> by index", async(item)=>
{
  await click(dropDown({'name':'options'}).elements()[item]);
  await click(await $(".detail__add2cart"));
})

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在另一台机器上出现“单元测试适配器无法连接到数据源或无法读取数据”错误 - Getting “The unit test adapter failed to connect to the data source or to read the data” error on different machine 在编码的ui测试中使用csv文件的数据时,前导0缺失 - Leading 0's missing from the data of csv file while using it in coded ui test 缺少部署在测试控制器上的文件(TFS 2013) - Missing files deployed on Test Controller (TFS 2013) 由于缺少程序集引用,CodedUI测试失败了吗? - CodedUI tests failing due to missing assembly reference? 运行已编码的ui生成自动测试得到:无法将测试运行排队到收集数据和诊断信息的控制器上 - Running coded ui build auto tests gets: Failed to queue test run to the controller that collects data and diagnostics Assert.AreEqual失败。 预期值:&lt;(空)&gt; - Assert.AreEqual failed. Expected: <(Null)> 编码ui测试失败后的操作 - Action after failed coded ui test Swift UI 测试:无法安装请求的应用程序 - Swift UI Testing: Failed to install requested application CUITe /编码UI:鼠标单击位置错误(屏幕分辨率) - CUITe/Coded UI : mouse.Click position wrong (Screen resolutions) 编码的用户界面-播放未能找到具有给定搜索属性的控件 - Coded UI - The playback failed to find the control with the given search properties
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM