简体   繁体   中英

Is it possible to make a GUI from WebDriver test code?

I am quite new to WebDriver and Java so pardon if my jargon is elementary.

I just automated a data entry task using WebDriver for InternetExplorer. The task simple just logged into a database, pulled information from an Excel sheet, and inputted the data to corresponding fields.

I want to share this with my coworkers. Is it possible to create a program, a .exe , with a simple interface that anyone, regardless of programming knowledge can use? If so can you point me in the right direction?

Also, is it possible to make the Internet Explorer Browser not appear on the screen, but run in the background.

Thank you.

You can use swing and create runnable jar.

The easiest way to hide the browser is to install PhantomJS. Then, change this line:

driver = webdriver.Firefox()

to:

driver = webdriver.PhantomJS()

Also you can check GhostDriver.

Check this: How to run ghostdriver with Selenium using java

You can use HtmlUnit Driver to run tests without GUI. Refer selenium documentation

WebDriver driver = new HtmlUnitDriver();

You can build your project as jar along with dependent jars, others can use this jar to run tests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM