To click an element within an iframe, you can use the switchTo() method in Selenium WebDriver to switch the focus to the desired iframe. Once you have switched to the iframe, you can then locate the element you want to click within the iframe using the element locator methods provided by WebDriver, such as findElementById(), findElementByXPath(), etc. Once you have located the element, you can simply call the click() method on it to simulate a click.