Question: I have created the wordpress folder inside the root. Now I wanna to set it main domain.
for example. my site url is <http://www.example.com>
 wordpress url is <http://www.example.com/wordpress>

Now I wanna set wordpress as site url , it open with the main url

when I enter the <http://www.example.com> then it show me the wordrpess site that I have created, Please let me know how I can do it?

Answer: 
As you didn't post the Java code you wrote, so I can't point out what went wrong exactly.

However, I don't think same id matters anyway. (But that's really bad, you should change it though)

Remember, `switchTo().frame()` has three overloads, you shouldn't be using index or name/id, but pass in the frame element itself. See [source code here](https://code.google.com/p/selenium/source/browse/java/client/src/org/openqa/selenium/WebDriver.java#306).

> 
> WebDriver frame(int index); // unstable
> 
> 
> WebDriver frame(String nameOrId); // not working in your case, as they identical
> 
> 
> WebDriver frame(WebElement frameElement); // the one you want
> 
> 
> 

Even `driver.findElements(By.name("content")).get(N)` is bad, as it depends on the order of elements, working but not elegant.

You can locate the frames either by parent `<div>` id attribute or by frame `src` attribute.

```java
// switch out of all frames, just in case, you might not need this line here
driver.switchTo().defaultContent();

// switch to customer frame
WebElement customerFrame = driver.findElement(By.cssSelector("#folderCustomer iframe"));
// alternative css locator: By.cssSelector("iframe[src*='customerSearch']")
driver.switchTo().frame(customerFrame);

// now inside customer frame, you can do stuff

// when you done, switch out of it
driver.switchTo().defaultContent();

// switch to producer frame now
WebElement producerFrame = driver.findElement(By.cssSelector("#folderProducer iframe"));
// alternative css locator: By.cssSelector("iframe[src*='producerSearch']")
driver.switchTo().frame(producerFrame);

// now inside producer frame, you can do stuff

```
In this kind of case Xpath is a bast way to find an element. You can differentiate both element by their Xpath.