1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

http login request - selenium webdriver

Discussão em 'StackOverflow' iniciado por Stack, Janeiro 17, 2021.

  1. Stack

    Stack Membro Participativo

    I have experienced a similar issue to https login request - selenium webdriver with a small caveat that I am not able to land on the home lading page after the http login process. I noticed that JSessionId is written to a cookie but does not complete the redirection fully. Here is a complete description of the issue:

    I was trying to login using http login url to an application and do my actions, but unable to do the same because login process is not completed successfully.

    These are my observations.

    When I hit the login url and logs in, internally it is leading or redirected to another url having JSESSION ID appended to it and do not complete the login process successfully

    I tried to login to page with url: http:/abcd.xyz.com:7900/ms/index.do. It is expected to be landed on http:/abcd.xyz.com:7900/ms/ms.do?time= after successful login. But during this login process, it is generating JSESSIONID through several redirections and it fails to land on home page.

    Steps :

    The actual login url is like : http:/abcd.xyz.com:7900/ms/index.do

    when I hit the above url driver.get("https:/abcd.xyz.com:7900/ms/index.do"); and try to complete the login process, it is partially completed with redirection to http://abcd.xyz.com:7900/ms/login.do;jsessionid=eap1.eap

    After successful login it is expected to land on home page with url http://abcd.xyz.com:7900/ms/ms.do?time= but that never happens. The test ends up with NoSuchElementFound because it could not successfully login.

    My ChromeDriver Options code looks like : // Set Preferences Map<String, Object> prefs = new HashMap<String, Object>(); prefs.put("credentials_enable_service", false); prefs.put("password_manager_enabled", false);

    chromeOptions.addArguments("--disable-save-password-bubble");
    chromeOptions.addArguments("disable-infobars");
    chromeOptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
    chromeOptions.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true);
    chromeOptions.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
    chromeOptions.addArguments("--disable-web-security","--ignore-certificate-errors", "--allow-running-insecure-content");
    chromeOptions.setAcceptInsecureCerts(true);


    Any help to resolve this mystery will be appreciated. Thank you!

    I have noticed same issue with Cypress.io as well.

    Continue reading...

Compartilhe esta Página