Q:

How can i click submit button

How can i click on submit button on the given html 
<span class="sbt-btn-wrap relative">
<input class="submit icon" type="submit" onclick="submitmnLogin($(this), 'testPrepLogin');trackGaEvent('Content Hub Home','Login Popup','Login Button');">

I have tried    
driver.findElement(By.className("sbt-btn-wrap relative")).click();

and 
driver.findElement(By.className("submit icon")).click();

but it is not working.

A:

When you have two class names with space separating them, then you cannot use By.className on it. Instead use By.cssSelector to click on the element. Here's how -
driver.findElement(By.cssSelector(".submit.icon")).click();

If you still want to use className then use one class name that is unique to the element and click on it -
driver.findElement(By.className("submit")).click();

You can use other attributes to click the input element. I prefer using cssSelector instead of xpath as its slow - 
driver.findElement(By.cssSelector("input[type='submit']")).click();

Here's an example of xpath too -
driver.findElement(By.xpath("//input[@type='submit']")).click();

If you are not able to find submit button element in a unique way then use other unique element to find input element.
driver.findElement(By.cssSelector(".sbt-btn-wrap relative .submit")).click();

Hope it helps.

