The following C# code may help you.
IWebElement frame = this.webDriver.FindElement(By.Id("xxx")); return this.webDriver.SwitchTo().Frame(frame).FindElement(By.Id("xxx"));
The following C# code may help you.
IWebElement frame = this.webDriver.FindElement(By.Id("xxx")); return this.webDriver.SwitchTo().Frame(frame).FindElement(By.Id("xxx"));