The source of WebDriver/Interactions/Actions.cs is here, clearly you can see Perform() includes Build(), so the answer is no, you don't need to build before perform, unless you want to pass the built IAction around without performing./// <summary>/// Builds the sequence of actions./// </summary>/// <returns>A composite <see cref="IAction"/> which can be used to perform the actions.</returns>public IAction Build(){ CompositeAction toReturn = this.action; this.action = new CompositeAction(); return toReturn;}/// <summary>/// Performs the currently built action./// </summary>public void Perform(){ this.Build().Perform();}此外,对于任何其他阅读此帖子的人:Also, for anyone else reading this post: Java绑定:build()包含在perform()中.来源: interactions/Actions.java Java binding: build() is included in perform(). Source: interactions/Actions.java Ruby/Python:只有perform,没有这样的东西叫build.来源: action_chains.py , action_builder.rb Ruby/Python: only have perform, no such thing called build. Source: action_chains.py, action_builder.rb 这篇关于WebDriver Actions.Perform()或Actions.Build().Perform()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-18 01:30