简体   繁体   中英

How to maximize browser window with helium using Java?

I am trying to implement helium in my project, I checked the API doc of helium but I didn't find any commend to maximize the browser.

In the API doc I found solution to launch the browser. Code is as following

startFirefox();
startFirefox("google.com");

So I would appreciate if any one can help me with this. Is it possible to integrate Selenium and helium all together?

You can use Selenium WebDriver by integrating with Helium. The following code would work fine:

import static com.heliumhq.API.*;
import org.openqa.selenium.*;

startFirefox("http://www.google.com");//This is the Helium code
getDriver().manage().window().maximize();//getDriver is Helium method and other portion is WebDriver code

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