0

Well i need a help for detecting a iframe in webpage (c# form) and simulate a click inside anywhere in the iframe. I tried this code to get iframe with the id inside the iframe but no idea to completete it fully.

var frame = webBrowser1.Document.Window.Frames["iframeid"];

I looked at many topics and i couldn't preciously get a exact ouput i want maybe also because iam new newbie in this thing so please guys help and it would be great appreciated.

Thanks in advance.

1 Answer 1

1

First you need to switch to iframe and then you can perform operations.

Try (C#):

driver.SwitchTo().Frame(string frameName); // Select a frame by its name or ID.

Or

driver.SwitchTo().Frame(int frameIndex); // Select a frame by its (zero-based) index.

Or

IWebDriver Frame(IWebElement frameElement); //Select a frame using its previously located OpenQA.Selenium.IWebElement
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.