How to run http:// Authentication url : 


        Go to http://username:password@hostname.com

                         (or)

        Go to  https://username:password@hostname.com


In case if https://username:password@hostname.com is not working, please use custom function for https:// or http://  authentication. Refer the example below to create custom function for authentication.


Just copy and paste blow code to custom function and create use in your custom steps. Refer 

How to create and use Custom Functions in Testsigma?

import org.openqa.selenium.WebDriver;
import com.testsigma.customfunc.common.CustomTestStep;
import com.testsigma.customfunc.result.TestStepResult;
import com.testsigma.customfunc.result.ResultConstants;
import org.openqa.selenium.Keys;
import org.openqa.selenium.Alert;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.Capabilities;


import com.testsigma.customfunc.common.TestsigmaCustomFunctions;

public class Authentication extends TestsigmaCustomFunctions{
 @CustomTestStep
  public TestStepResult authenticationURL(String url, String username, String password) throws InterruptedException {
Capabilities cap = ((RemoteWebDriver) driver).getCapabilities();
String browser = cap.getBrowserName();
if(browser.equals(BrowserType.CHROME) || browser.equals(BrowserType.GOOGLECHROME)) {
  if(url.startsWith("https://")) {
    url = url.replace("https://", "https://" + username + ":" + password + "@");
  } 
  else  {
    url = url.replace("http://", "http://" + username + ":" + password + "@");
  }
  driver.get(url);
} else if (browser.equals(BrowserType.FIREFOX)) {
  driver.get(url);  
  Alert alert = driver.switchTo().alert();
   alert.sendKeys(username + Keys.TAB.toString()+ password);
  alert.accept();
  Thread.sleep(3000);
  alert.sendKeys(username + Keys.TAB.toString()+ password);
  alert.accept();
   Thread.sleep(3000);
} else if (browser.equals(BrowserType.IE)) {
  if(url.startsWith("https://")) {
    url = url.replace("https://", "https://" + username + ":" + password + "@");
  } else {
    url = url.replace("http://", "http://" + username + ":" + password + "@");
  }
  driver.get(url);
} else {
  driver.get(url);
}
      TestStepResult result = new TestStepResult();
result.setStatus(ResultConstants.SUCCESS);
result.setMessage("Successfully Executed");
return result;
  }

}



Now go to create test step page and select custom function option then select function name.


1. Enter url in url field.

2. Enter username in username field.

3. Enter password in password field and click on create.


Step is created now.