Open kazurayam opened 6 months ago
Since v0.7.0, we are able to do this already:
@Test
void test_allChromeUserProfileAsString() {
String text = ChromeProfileUtils.allChromeUserProfilesAsString()
logger.debug("[test_allChromeUserProfileAsString] text: " + text)
assertTrue( text.length() > 0)
}
Output:
[Test worker] INFO com.kazurayam.webdriverfactory.chrome.ChromeProfileUtilsTest - [test_allChromeUserProfileAsString] text: [
{"userProfile":"Kazuaki","userDataDir":"/Users/kazurayam/Library/Application Support/Google/Chrome","cacheDirectoryName":"Default"},
{"userProfile":"Picasso","userDataDir":"/Users/kazurayam/Library/Application Support/Google/Chrome","cacheDirectoryName":"Profile 17"}
]
ChromeProfileUtils
class implements a method that returns List<ChromeUserProfile>
public static List<ChromeUserProfile> getChromeUserProfileList() throws IOException
and
public static List<ChromeUserProfile> getChromeUserProfileList(final Path userDataDir) throws IOException
It would be nice to have that.