空手道用户界面:所选选项未应用到下一页 [英] Karate UI: Selected option not applied on next page

查看:69
本文介绍了空手道用户界面:所选选项未应用到下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试做一个简单的选择,然后是下一个场景.

I'm attempting to do a simple select, then next page scenario.

我可以成功选择以下选项,即:

I am able to successfully select the option with the follow ie:

* select('#detectorType', 'VECTOR_SPACE_EXPANDED')

* select('select[id=detectorType]', 1)

我可以看到UI上的菜单选项发生了变化.

I can see the menu options change on the UI.

但是,当我完成表单并转到下一页时,仅应用默认选择(列表中的第一个).

However, when I complete the form and go the next page, only the default selection is applied (the first one on the list).

我还尝试按照w3.org编写脚本.也没有运气.手动干预有效.

I also tried doing a script as per the w3.org. No luck either. Manual intervention works.

为什么不应用所选选项?

Why isn't the selected option being applied?

推荐答案

最有可能是因为页面上有很多精美的JavaScript.除非有一种模拟方法,否则谁也说不清.最好的选择是使用以下过程提交示例: https: //github.com/intuit/karate/tree/develop/examples/ui-test

Most likely because of a lot of fancy JavaScript on the page. No one can tell unless there is a way to simulate. The best option is for you to submit an example using this process: https://github.com/intuit/karate/tree/develop/examples/ui-test

也就是说,看看手动触发onChanged事件是否可以使您顺利进行.有关详细信息,请参见以下答案: https://stackoverflow.com/a/60800181/143475

That said, see if firing a onChanged event manually will get you going. See this answer for details: https://stackoverflow.com/a/60800181/143475

例如文档中提供的示例: https://github .com/intuit/karate/tree/develop/karate-core#script

For example as given in the docs: https://github.com/intuit/karate/tree/develop/karate-core#script

* waitFor('#someId').script("_.dispatchEvent(new Event('change'))")

这篇关于空手道用户界面:所选选项未应用到下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆