Skip to main content

6 replies

mathieud0001
Brainy
May 10, 2023

There's a section in the custom.properties to specify Chrome options

#Use comma separated values ex: username=appian,accessKey=,browserName=Safari,platform=mySecretAccessKeycOS 10.13,version=11.1,name=My Safari Test
#These two chromeOptions capabilities profile.default_content_settings.popups=0) and safebrowsing.enabled=true are hard coded capabilities.
#You'll need to set chromeOptions to blank to override those capabilities.
chrome.capabilities=

May 11, 2023

Yes, it is possible to add or update Chrome Options while using Cucumber for Appian. Here's an example of how you can do this:

First, you need to import the necessary libraries:

java
Copy code
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
Then, you can create a new instance of the ChromeOptions class and set the options you want to add or update. Here's an example:

java
Copy code
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized"); // add option to start the browser in maximized mode
options.addArguments("--disable-notifications"); // add option to disable browser notifications
Finally, you can pass the ChromeOptions instance to the ChromeDriver constructor to create a new driver instance with the desired options:

java
Copy code
WebDriver driver = new ChromeDriver(options);
This will create a new instance of the Chrome browser with the specified options.

You can also update existing options by calling the setExperimentalOption method on the ChromeOptions instance. Here's an example:

java
Copy code
options.setExperimentalOption("prefs", Map<String, Object> prefs); // update preferences for Chrome
I hope this helps! Let me know if you have any further questions.

Regards,

Rachel Gomez

May 24, 2023

In that case we are not using the default chromedriver instance provided by appian and hence the cucumber commands provided in CheatSheet.feature do not work because those are not attached to the custom driver instance.

May 23, 2023

To give a little bit of context the Appian framework handles the Selenium driver in a back-end class/method

Kick The Buddy

mallepup3914
May 23, 2023

Yes, it is possible to add or update Chrome options while using Cucumber for Appian. In Cucumber, you can utilize the Selenium WebDriver to interact with the Chrome browser and customize its options.

June 14, 2023

I don't know if your question is related to the ongoing Chrome bug but we found it helpful to add this to our testRunner

@BeforeClass
public static void seleniumErrorFix(){
System.setProperty("webdriver.http.factory", "jdk-http-client");
}