Search code examples
node.jsseleniumwebdriverselenium-firefoxdriverfirefox-driver

Get firefox profile path in selenium WebdriverJS


How can I access/get the firefox profile path, from welenium webdriver?

I can't seem to find it in the docs here: https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_Capabilities.html


Solution

  • Okey so to get the profile what I ended up doing is the following:

    let capabilities = await this.firefox.getCapabilities();
    let profile = capabilities.get('moz:profile');
    

    Then you have access to the temporal profile.