# Opening Firefox with a Specific, non anonymous profile

**URL:** <https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012>\
**Category:** Feature Request\
**Tags:** feature-request, katalon-studio\
**Created:** [July 12, 2018, 1:03pm UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012 "2018-07-12T13:03:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_Chan](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@Samuel\_Chan](https://forum.katalon.com/u/Samuel_Chan)\
**Post date:** [July 12, 2018, 1:03pm UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/1 "2018-07-12T13:03:57Z")

</div>

Hi, I’ve noticed that Katalon is unable to firefox with a specific profile–this is a functionality built into Selenium, but because Katalon manages the opening of browsers, Selenium is unable to control that.

Katalon currently doesn’t have this implementation–opening firefox with a specific profile, which would be enormously beneficial for a variety of tasks (esp, for me, associating a security certificate with a profile)

Current selenium implementation:

This is a code to implement a profile, which can be embedded in the selenium code.

```auto
ProfilesIni profile = new ProfilesIni();

```

// this will create an object for the Firefox profile

```auto
FirefoxProfile myprofile = profile.getProfile("xyzProfile");

```

// this will Initialize the Firefox driver

```auto
WebDriver driver = new FirefoxDriver(myprofile)

```

Perhaps even just choose default profile to open with?

![](https://s3.amazonaws.com/katalon-forum/editor/vo/k28a30a0ppq6.png "Image: https://s3.amazonaws.com/katalon-forum/editor/vo/k28a30a0ppq6.png")

Please consider adding this functionality in your next update.

Thank you so much, Katalon Team!

[scrn.png](https://s3.amazonaws.com/katalon-forum/editor/vo/k28a30a0ppq6.png)

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [July 13, 2018, 2:47am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/2 "2018-07-13T02:47:33Z")

</div>

You can open Firefox with a specific, non anonymous profile in Katalon Studio; though it is a bit cumbersome.

I made a Test Case like this and tried. I got success:

```auto
import org.openqa.selenium.WebDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.firefox.internal.ProfilesIni
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.driver.WebUIDriverType
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
//WebUI.openBrowser('')
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()
switch(executedBrowser) {
    case WebUIDriverType.FIREFOX_DRIVER: // "Firefox" ProfilesIni profile = new ProfilesIni();
        FirefoxProfile FF = profile.getProfile("SeleniumFF");
        FirefoxOptions options = new FirefoxOptions().setProfile(FF); System.setProperty('webdriver.gecko.driver', DriverFactory.getGeckoDriverPath())
        WebDriver driver = new FirefoxDriver(options);
        // let Katalon Studio to use the WebDriver created here
        DriverFactory.changeWebDriver(driver)
        break
}
WebUI.navigateToUrl('http://demoaut.katalon.com/')
WebUI.comment('>>> opened http://demoaut.katalon.com/ in FireFox with SeleniumFF profile')
WebUI.closeBrowser()

```

Perhaps the following line is interesting for you.

```auto
        DriverFactory.changeWebDriver(driver)

```

by this line, you can tell Katalon Studio to use the WebDriver object you created.

I did this experiment using Katalon Studio 5.4.2

---

<div class="post-metadata">

**Author:** ![Zeeshan\_Shaikh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zeeshan_shaikh/32/3904_2.png) [@Zeeshan\_Shaikh](https://forum.katalon.com/u/Zeeshan_Shaikh)\
**Post date:** [July 17, 2018, 8:00am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/3 "2018-07-17T08:00:58Z")

</div>

This is picking up default profile even if I have provided the different profile.

---

<div class="post-metadata">

**Author:** ![Zeeshan\_Shaikh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zeeshan_shaikh/32/3904_2.png) [@Zeeshan\_Shaikh](https://forum.katalon.com/u/Zeeshan_Shaikh)\
**Post date:** [July 17, 2018, 9:05am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/4 "2018-07-17T09:05:25Z")

</div>

I changed the line

```auto
FirefoxOptions options = new FirefoxOptions().setProfile(new FirefoxProfile());toFirefoxOptions options = new FirefoxOptions().setProfile(FF);But am getting memmory errorTest FAILED because (of) java.lang.OutOfMemoryError: Java heap space

```

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [July 18, 2018, 12:57am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/5 "2018-07-18T00:57:58Z")

</div>

> Zeeshan Shaikh said:
> 
> This is picking up default profile even if I have provided the different profile.

I verified my code, and found the default profile seems to be picked up. I wanted to use the SeleniumFF profile. Unnn…

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [July 18, 2018, 4:52am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/6 "2018-07-18T04:52:37Z")

</div>

Zeeshan,

> This is picking up default profile even if I have provided the different profile.

No. This procedure successfully picks up the different profile.

I looked at this issue a bit. My current view is as follows:

(1) The method I posted above DOES work. ProfilesIni, FirefoxProfile, FirefoxOptions, FirefoxDrivers and DriverFactory.chageDriver(driver) — this procedure successfully opens Firefox with the targeted custom profile.

(2) You can check which profile is currently applied in the Firefox-builtin “ **about:profiles** ” page. But you should be careful what exactly is displayed in the “about:profiles” page — it is misleading.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [July 18, 2018, 5:22am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/7 "2018-07-18T05:22:23Z")

</div>

I will describe what I have found.

I made 2 Firefox profiles: usualProfile and seleniumProfile:  
 ![](https://s3.amazonaws.com/katalon-forum/editor/u8/9nb29fmnjd9u.png)

By clicking “start firefox” button with seleniumProfile selected, I got the following “about:profiles” page. Please note that a Green Extension icon is displayed. **This Green icon indicates that Firefox is opened with seleniumProfile.**  
 ![](https://s3.amazonaws.com/katalon-forum/editor/qx/fqqpwtv6ro9r.png)

In the “firefox.exe -P” dialog I selected usualProfile.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/6o/mgs25to9x8z0.png)

Then, By clicking “start firefox” button with usualProfile selected, I got the following “about:profiles” page. Please note that a Red Extension icon is displayed and no Green icon there. **This Red icon indicates that Firefox is opened with usualProfile.**  
 ![](https://s3.amazonaws.com/katalon-forum/editor/du/a02sk9ezeyrb.png)

Now, I go back to Katalon Studio, executed the following testcase:

```auto
import org.openqa.selenium.WebDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.firefox.internal.ProfilesIni
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.driver.WebUIDriverType
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
//WebUI.openBrowser('')
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()
switch(executedBrowser) {
    case WebUIDriverType.FIREFOX_DRIVER: // "Firefox"
        ProfilesIni profile = new ProfilesIni();
        FirefoxProfile FF = profile.getProfile("seleniumProfile");
        FirefoxOptions options = new FirefoxOptions().setProfile(FF); System.setProperty('webdriver.gecko.driver', DriverFactory.getGeckoDriverPath())
        WebDriver driver = new FirefoxDriver(options);
        // let Katalon Studio to use the WebDriver created here
        DriverFactory.changeWebDriver(driver)
        break
}
WebUI.navigateToUrl('http://demoaut.katalon.com/')

//WebUI.closeBrowser()

```

Then I got the following “about:profiles” page displayed:

![](https://s3.amazonaws.com/katalon-forum/editor/sw/soko2rrdllhc.png)

Please find

(1) On the top-right of the window, I find a Green extension icon. This Green icon indicates that the Firefox is opened with the **seleniumProfile**.

(2) However the “about:profiles” page is saying that the **usualProfile** is in use.  
**\_  
Inconsistent!\_**

I think that

(a) Firefox browser is actually opened with seleniumProfile which I specified through WebDriver call. The test case code ran successful

(b) The “about:profiles” page displays some static information which can be visualized by “firefox.exe -P” command. The “about:profiles” page shows the previous record which user profiles you clicked and selected in the UI for the last time. The “about:profiles” does not displays dynamic status which Profiles has been applied by WebDriver to the current Forefox process.

-----

So, my lesson is that **“about:profiles” of Firefox does not tell me the truth (which user profile is applied) when Firefox is opened by WebDriver**.

[19122\_i\_have\_2\_firefox\_profiles.png](https://s3.amazonaws.com/katalon-forum/editor/u8/9nb29fmnjd9u.png)

[19122\_seleniumProfile\_applied.png](https://s3.amazonaws.com/katalon-forum/editor/qx/fqqpwtv6ro9r.png)

[19122\_usualProfile\_applied\_2.png](https://s3.amazonaws.com/katalon-forum/editor/du/a02sk9ezeyrb.png)

[19122\_select\_usualProfile.png](https://s3.amazonaws.com/katalon-forum/editor/6o/mgs25to9x8z0.png)

[19122\_Firefox\_opened\_by\_webdriver\_shows\_about-profiles\_page\_misleading.png](https://s3.amazonaws.com/katalon-forum/editor/sw/soko2rrdllhc.png)

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [July 18, 2018, 6:41am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/8 "2018-07-18T06:41:33Z")

</div>

Hmm I didn’t get any errors here (I’m using Katalon Studio 5.5), here is my code:

```auto
import org.openqa.selenium.WebDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.firefox.internal.ProfilesIni
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.driver.WebUIDriverType
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
//WebUI.openBrowser('')
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()
switch(executedBrowser) {
    case WebUIDriverType.FIREFOX_DRIVER: // "Firefox"
        ProfilesIni profile = new ProfilesIni();
        FirefoxProfile FF = profile.getProfile("SeleniumFF");
        FirefoxOptions options = new FirefoxOptions().setProfile(FF);
	System.setProperty("webdriver.firefox.bin", "/Applications/Firefox.app/Contents/MacOS/firefox")
	System.setProperty("webdriver.gecko.driver", "/Users/nguyenvinh/Desktop/Branch/5.5/Katalon Studio.app/Contents/Eclipse/configuration/resources/drivers/firefox_mac/geckodriver")
        WebDriver driver = new FirefoxDriver(options);
        // let Katalon Studio to use the WebDriver created here
        DriverFactory.changeWebDriver(driver)
        break
}
WebUI.navigateToUrl('http://demoaut.katalon.com/')
WebUI.comment('>>> opened http://demoaut.katalon.com/ in FireFox with SeleniumFF profile')
WebUI.closeBrowser()

```

---

<div class="post-metadata">

**Author:** ![Zeeshan\_Shaikh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zeeshan_shaikh/32/3904_2.png) [@Zeeshan\_Shaikh](https://forum.katalon.com/u/Zeeshan_Shaikh)\
**Post date:** [July 18, 2018, 8:10am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/9 "2018-07-18T08:10:19Z")

</div>

I used firefox profile path instead of getting firefox profile through ProfilesIni. Don’t know why but getting profiles via Ini is giving me a memory error.

```auto
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()if (executedBrowser == WebUIDriverType.FIREFOX_DRIVER) {	KeywordUtil.logInfo("Using Firefox Profile")	FirefoxProfile FF = new FirefoxProfile(new File(GlobalVariable.firefoxProfilePath));	FirefoxOptions options = new FirefoxOptions().setProfile(FF)	WebDriver driver = new FirefoxDriver(options)	DriverFactory.changeWebDriver(driver)}else{	WebUI.openBrowser('')}

```

---

<div class="post-metadata">

**Author:** ![Zeeshan\_Shaikh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zeeshan_shaikh/32/3904_2.png) [@Zeeshan\_Shaikh](https://forum.katalon.com/u/Zeeshan_Shaikh)\
**Post date:** [July 18, 2018, 8:12am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/10 "2018-07-18T08:12:25Z")

</div>

@[kazurayam](http://forum.katalon.com/profile/4280/kazurayam)

Thanks for the efforts and explanation

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [July 18, 2018, 8:32am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/11 "2018-07-18T08:32:40Z")

</div>

How about inserting some debug prints for inspection?

```auto
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()
if (executedBrowser == WebUIDriverType.FIREFOX_DRIVER) {
	KeywordUtil.logInfo("Using Firefox Profile")
	println "GlobalVariable.firefoxProfilePath=${GlobalVariable.firefoxProfilePath}"
        File profileDir = new File(GlobalVariable.firefoxProfilePath)
        assert profileDir.exists()
        assert profileDir.isDirectory()
        FirefoxProfile FF = new FirefoxProfile(profileDir)
	FirefoxOptions options = new FirefoxOptions().setProfile(FF)
        System.setProperty('webdriver.gecko.driver', DriverFactory.getGeckoDriverPath())
	WebDriver driver = new FirefoxDriver(options)
	DriverFactory.changeWebDriver(driver)
} else {
	WebUI.openBrowser('')
}

```

I would presume that “assert profileDir.exists()” would fail for some reason.

---

<div class="post-metadata">

**Author:** ![Zeeshan\_Shaikh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zeeshan_shaikh/32/3904_2.png) [@Zeeshan\_Shaikh](https://forum.katalon.com/u/Zeeshan_Shaikh)\
**Post date:** [July 18, 2018, 9:46am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/12 "2018-07-18T09:46:49Z")

</div>

Using firefox profile path works fine for me.

The only issue is with getting the profile using

```auto
ProfilesIni profile = new ProfilesIni();
FirefoxProfile FF = profile.getProfile("SeleniumFF");
FirefoxOptions options = new FirefoxOptions().setProfile(FF);

```

---

<div class="post-metadata">

**Author:** ![Samuel\_Chan](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@Samuel\_Chan](https://forum.katalon.com/u/Samuel_Chan)\
**Post date:** [July 30, 2018, 7:27pm UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/13 "2018-07-30T19:27:44Z")

</div>

Here is the fully functional code, after some experimenting:

import org.openqa.selenium.firefox.FirefoxDriver

import org.openqa.selenium.firefox.FirefoxOptions

import org.openqa.selenium.firefox.FirefoxProfile

import org.openqa.selenium.firefox.internal.ProfilesIni

import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.webui.driver.WebUIDriverType

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

// Open Browser with firefox profile UserONE

WebUI.openBrowser(’’)

WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()

switch (executedBrowser) {

case WebUIDriverType.FIREFOX\_DRIVER:

ProfilesIni profile = new ProfilesIni();

// Assume you’ve already created a profile, UserONE

FirefoxProfile FF = profile.getProfile(“UserONE”);

FirefoxOptions optionsFF = new FirefoxOptions().setProfile(FF);

WebDriver driverFF = new FirefoxDriver(optionsFF);

// Close the other opened window with the anonymous profile

WebUI.closeBrowser()

// let Katalon Studio use the WebDriver created here

DriverFactory.changeWebDriver(driverFF)

break

}

WebUI.maximizeWindow()

// Nav to url

WebUI.navigateToUrl(‘[somesite.com](http://somesite.com)’)

---

<div class="post-metadata">

**Author:** ![adam2](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@adam2](https://forum.katalon.com/u/adam2)\
**Post date:** [November 26, 2018, 4:49pm UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/14 "2018-11-26T16:49:22Z")

</div>

right and can you telme how would u open about 100 diff profiles of ffox from excel or csv or database data ?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [November 27, 2018, 8:00am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/15 "2018-11-27T08:00:37Z")

</div>

I have made and published a demo project in Github

- [GitHub - kazurayam/KatalonDiscussion7892: How to open Firefox with a specific, non anonymous profile in Katalon Studio](https://github.com/kazurayam/KatalonDiscussion7892)

----------

## Description

### How to start Firefox with prepared user profile

Have a look at the source of [Test Cases/TC1](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/Scripts/TC1/Script1531449007343.groovy)

### How to start Firefox with multiple user Profiles

I made a Excel book named `Book1.xlsx` and saved in the folder `Data Files`. It contains the following content: [![Book1](https://europe1.discourse-cdn.com/katalon/original/1X/64b1e903af35e3874c146daed6c65685f00f2259.png)](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/docs/images/Book1.png)

I registered the Excel file into Katalon Studio. See the document [Manage Test Data](https://docs.katalon.com/katalon-studio/docs/manage-test-data.html) [![](https://dub1.discourse-cdn.com/katalon/uploads/default/original/1X/a5a2a0dc3e760804638d863321af494622e079ee.png)](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/docs/images/DataFile.png)

We can iterate over the list of user profile names in the data file (‘usualProfile’, ‘seleniumProfile’) in two ways.

1. a Test Case iterates over the data while invoking another Test Case passing the profile name as parameter. Please find the code: [`Test Cases/TC2`](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/Scripts/TC2/Script1543285423118.groovy) iterates over the list of Profile names while calling another [`Test Cases/worker`](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/Scripts/worker/Script1543285477659.groovy)
2. a Test Suite iterates over the data while invoking another Test Case passing the profile name as parameter. The following screenshot shows how `Test Suites/TS3` is defined: [![](https://dub1.discourse-cdn.com/katalon/uploads/default/original/1X/5fb74edfe91095e0e20525b2709ad1de452893db.png)](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/docs/images/TS3.png)

Both approach resulted the same output in the log:

```auto
...>>> opened http://demoaut.katalon.com/ in FireFox with profile named usualProfile...>>> opened http://demoaut.katalon.com/ in FireFox with profile named seleniumProfile...

```

[![](https://dub1.discourse-cdn.com/katalon/uploads/default/original/1X/2d21fa522048fbe3deeb007b6a6bacc48097c7bd.png)](https://github.com/kazurayam/KatalonDiscussion7892/blob/master/docs/images/log.png)

I think this log messages proves that I could start Firefox sequentially multiple times with different customer profiles recorded in Excel file.

The Katalon documentation [Data driven testing](https://docs.katalon.com/katalon-studio/tutorials/data_driven_testing.html#data-driven-tests-execution) is describing similar know-how.

---

<div class="post-metadata">

**Author:** ![adam2](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@adam2](https://forum.katalon.com/u/adam2)\
**Post date:** [November 27, 2018, 11:47am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/16 "2018-11-27T11:47:15Z")

</div>

hi [kazurayam](http://forum.katalon.com/profile/4280/kazurayam "Link: http://forum.katalon.com/profile/4280/kazurayam")  
thanks for the description 🙂 i managed to load custom profiles using database data and add variables yesterday itself but thanks again i will test it with the method via excel posted by you .

an issue i’m facing that the firefox browsers do not fully close after completing the action successfully on a particular profile… the task ends but browser reopens and so i can see multiple browsers opened up after task completion ! say there are 5 profiles so i can see 5 browsers opened up .

thanks

---

<div class="post-metadata">

**Author:** ![adam2](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@adam2](https://forum.katalon.com/u/adam2)\
**Post date:** [December 4, 2018, 2:32am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/17 "2018-12-04T02:32:10Z")

</div>

any 1 ?

---

<div class="post-metadata">

**Author:** ![JOE\_F](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@JOE\_F](https://forum.katalon.com/u/JOE_F)\
**Post date:** [May 24, 2019, 4:43am UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/18 "2019-05-24T04:43:47Z")

</div>

I have tried the above code for setting the FF profile with my ‘default’ profile. It’s working fine to run a testcase. If I didn’t specify to close the browser ( WebUI.closeBrowser()), it should continue to use the same browser for running the next testcase?  
But after the testcase is done, I cannot reuse the same driver for rerunning the testcase.

Basically if I have a testsuite with 10 testcases, it will launch a new geckodriver for each testcase. Any idea how to reuse the same geckodriver and same browser for running all the testcases in the testsuite?

---

<div class="post-metadata">

**Author:** ![tgeabler](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/tgeabler/32/16104_2.png) [@tgeabler](https://forum.katalon.com/u/tgeabler)\
**Post date:** [January 16, 2020, 2:00pm UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/19 "2020-01-16T14:00:55Z")

</div>

@kazurayam I am new to automation and trying to use your code because I need to create a non anonymous profile in order to save that sharing location is allowed and one of the imports isn’t working:

import org.openqa.selenium.firefox.internal.ProfilesIni

seems to be deprecated. Do you have any recommendations or work arounds?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [January 16, 2020, 10:16pm UTC](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012/20 "2020-01-16T22:16:26Z")

</div>

```auto
import org.openqa.selenium.firefox.internal.ProfilesIni

```

Changing this to:

```auto
import org.openqa.selenium.firefox.ProfilesIni

```

will make it improved.

How did I find it? — Because the Javadoc [https://selenium.dev/selenium/docs/api/java/org/openqa/selenium/firefox/internal/ProfilesIni.html](https://selenium.dev/selenium/docs/api/java/org/openqa/selenium/firefox/internal/ProfilesIni.html) sais “Use [ProfilesIni](https://selenium.dev/selenium/docs/api/java/org/openqa/selenium/firefox/ProfilesIni.html) instead.”

[Next page](https://forum.katalon.com/t/opening-firefox-with-a-specific-non-anonymous-profile/12012.md?page=2)
