Q:

Unable to recognize Element with relative xpath or other locator

I am facing an issue where I am unable to locate Element on webpage with any type of locator expect Absolute xpath.  Here are details:
URL : https://semantic-ui.com/modules/dropdown.html#selection
Required Element Screen shot:

Manually created Xpath Screen shot( Please note that I am able to recognize Element in web application with manually created xpath but Same xpath is not working in selenium code)

But Same xpath is not working in selenium script. 
PLEASE NOTE THAT I AM ABLE TO IDENTIFY SAME OBJECT WITH Absolute xpath
Please help to me to understand reason for this. 
Here is code:
public static WebDriver driver;

public static void main(String[] args) {

    driver= new FirefoxDriver();

    driver.manage().window().maximize();

    driver.manage().timeouts().implicitlyWait(10, TimeUnit. SECONDS);

    driver.get("https://semantic-ui.com/modules/dropdown.html");

    //Selection
    driver.findElement(By.xpath("//div[@class='ui selection dropdown upward']")).click();
    driver.findElement(By.xpath("//div[@class='menu transition visible']/div[text()='Female']")).click();

    System.out.println("Done");

A:

This may be issue with your first x-path.  You may try the following code.  It may work. 
driver.findElement(By.xpath("//div[@class='ui selection dropdown']").click();
driver.findElement(By.xpath("//div[@class='menu transition visible']/div[text()='Male']").click();

