Using Python/selenium running without headless mode is working fine but with headless Chromedriver it navigates to an unexpected page.[expected dashboard but in headless navigates to profile after login but in normal working fine]
Note: in geckodriver headless working fine
Python code:
if value == "True":
    chromeOptions.add_argument("--headless")           
    chromeOptions.add_argument('window-size=1920,1080')         
capabilities = DesiredCapabilities.CHROME.copy()       
if self.getPlateform() == "Windows":
    chromedriver = self.SRC_DIR +'yxyz\\chromedriver.exe'
else:
    chromedriver = self.SRC_DIR +'yxyz/chromedriver'
    logging.info(chromedriver)
    return webdriver.Chrome(
        executable_path=chromedriver,
        options=chromeOptions,
        desired_capabilities = capability
    )