【问题标题】:Select item from a Combo React JS application从 Combo React JS 应用程序中选择项目
【发布时间】:2020-03-04 15:39:50
【问题描述】:

我使用下面的代码从使用 selenium 的列表框中选择一个项目,因为 select 不可用 .. 我怎样才能在空手道中实现相同的目标。

public void selectOption(WebDriver driver, List ele, String option) throws InterruptedException { for(WebElement i: ele){

        if (i.getText().equalsIgnoreCase(option)){
            Actions actions = new Actions(driver);
            actions.moveToElement(i);
            actions.click().perform();
            break;
        }
        }

【问题讨论】:

    标签: karate


    【解决方案1】:

    这里是文档:https://github.com/intuit/karate/tree/master/karate-core#select

    类似这样的:

    * select('select[name=data1]', '{}Option Visible Text')
    

    如果您仍然卡住,请按照此流程进行操作,以便我们在需要时修复任何问题:https://github.com/intuit/karate/tree/master/examples/ui-test

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-10
      • 1970-01-01
      • 1970-01-01
      • 2022-07-06
      相关资源
      最近更新 更多