简体   繁体   English

Java中的关键字驱动框架(Selenium)

[英]Keyword driven framework (Selenium) in Java

I have created a Hybrid framework (Keyword driven + TestNG). 我创建了一个混合框架(关键字驱动+ TestNG)。 It is in Java and to execute the methods, I use reflections in Java. 它在Java中,为了执行这些方法,我在Java中使用了反射。 The code is in such a way that I am executing all methods (Action Keywords) using a single line of code (method[i].invoke()) Reflections and hence all the methods have to take same number and the same type of inputs. 代码的方式是,我使用一行代码(method [i] .invoke())反射来执行所有方法(动作关键字),因此所有方法都必须采用相同数量和相同类型的输入。 Is there a way in java that we can implement keyword driven framework without reflections or a better approach to achieve keyword driven framework with reflections? 在Java中,有没有一种方法可以实现无反射的关键字驱动框架,或者有更好的方法来实现有反射的关键字驱动框架?

I found the answer. 我找到了答案。 We can create keyword driven framework with keyword methods having the different number of parameters. 我们可以使用具有不同数量参数的关键字方法创建关键字驱动的框架。 Please check http://www.seleniumeasy.com/selenium-tutorials/keyword-driven-framework-example 请检查http://www.seleniumeasy.com/selenium-tutorials/keyword-driven-framework-example

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

相关问题 如何使用Selenium和Java在关键字驱动框架的任何方法中添加验证 - How to add verification inside any method in Keyword Driven Framework using selenium and java 当我将关键字用作 selenium 自动化的关键字驱动框架的 sendkeys 时,SendKeys 方法不起作用 - SendKeys method is not working when I am using keyword as sendkeys for keyword driven framework for selenium automation 如何构建数据驱动的 Selenium WebDriver + Java + TestNG 框架 - How to Build a Data Driven Selenium WebDriver + Java + TestNG Framework 如何在关键字驱动的框架中实施TestNg报告 - How to implement TestNg reporting in keyword driven framework Selenium Java Maven如何使用Fillo Qry数据驱动框架执行Testcase - Selenium java Maven how to execute Testcase with fillo qry data driven framework 数据驱动框架——如何使用Selenium WebDriver和java在excel表中读写 - Data Driven Framework — how to read and write in excel sheet using Selenium WebDriver with java Selenium-创建UI驱动的自动化框架 - Selenium - Creating UI driven automation framework 为关键字驱动的框架执行代码时出现空指针错误 - Null pointer error when executing code for keyword driven framework Java Selenium Chrome-关键字搜索器 - java Selenium Chrome - keyword searcher Java的数据驱动框架,用于下拉 - data driven framework with java for drop down
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM