title: How to send text to the username and password field within the webpage throug Safari Browser and selenium-webdriver
body: <p>I am trying to login to the webpage for which I am supposed to write test scripts. But the login script fails each time in Safari, although the same script runs well on Chrome. </p>
  
  <p>Error message displayed:</p>
  
  <pre><code>Sep 10, 2018 10:55:06 AM org.openqa.selenium.support.ui.ExpectedConditions findElement
  WARNING: WebDriverException thrown by findElement(By.id: mfacode)
  org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 0 milliseconds
  Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:05:20.749Z'
  System info: host: 'iMac.localdomain', ip: 'fe80:0:0:0:1c2b:a0b9:a043:3a94%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
  Driver info: org.openqa.selenium.safari.SafariDriver
  Capabilities {applicationCacheEnabled: true, browserName: safari, cleanSession: true, cssSelectorsEnabled: true, databaseEnabled: true, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: false, nativeEvents: true, platform: MAC, platformName: MAC, rotatable: false, version: 13605.3.8, webStorageEnabled: true}
  Session ID: E2219A59-8EEE-4380-93B6-77A7DDE289BE
  *** Element info: {Using=id, value=mfacode}
  </code></pre>
  
  <p>The script I am using:
  public class LoginSafari {</p>
  
  <pre><code>public static void main(String[] args) {
  
      System.setProperty("webdriver.safari.driver", "/usr/bin/safaridriver");
      WebDriver driver= new SafariDriver(); 
      driver.get("https://yapiapp.io/welcome");
      driver.manage().window().maximize();
      driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
      new WebDriverWait(driver, 30).until(ExpectedConditions.visibilityOfElementLocated(By.className("auth0-lock-input"))).sendKeys("alaka.goswami@*****.com");
      driver.findElement(By.name("password")).sendKeys("*******");
      driver.findElement(By.className("auth0-lock-submit")).click();
      // WebDriverWait wait=new WebDriverWait(driver, 40);
      driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);    
      new WebDriverWait(driver, 20).until(ExpectedConditions.visibilityOfElementLocated(By.id("******")));
      // username and password masked//
  </code></pre>
  
  <p>Is there any way to get passed this or solve this?</p>