C# Selenium - write an own click() method -


i wanna write own click() method , override different types. problem don´t know datatypes of:

  • id
  • xpath
  • name
  • value

normally write: driver.findelement(by.id("gui-id").click();

and want method this: click("gui-id");

who can me...?

by.something by object. can send method this

public void click(by by) {     driver.findelement(by).click(); } 

and call this

click(by.id("gui-id"));  click(by.name("gui-name")); // etc 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -