Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public void TestFrames()


//switch To IFrame using name or id
driver.FindElement(By.Name("iframe1-name"));
IWebElement iframe1=driver.FindElement(By.Name("iframe1-name"));
//Switch to the frame
driver.SwitchTo().Frame(iframe);
driver.SwitchTo().Frame(iframe1);
Assert.AreEqual(true, driver.PageSource.Contains("We Leave From Here"));
IWebElement email = driver.FindElement(By.Id("email"));
//Now we can type text into email field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public void informationWithElements() {


//switch To IFrame using name or id
driver.findElement(By.name("iframe1-name"));
WebElement iframe1=driver.findElement(By.name("iframe1-name"));
//Switch to the frame
driver.switchTo().frame(iframe);
driver.switchTo().frame(iframe1);
assertEquals(true, driver.getPageSource().contains("We Leave From Here"));
WebElement email = driver.findElement(By.id("email"));
//Now we can type text into email field
Expand Down
2 changes: 1 addition & 1 deletion examples/python/tests/interactions/test_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# --- Switch to iframe using name or ID ---
iframe1=driver.find_element(By.NAME, "iframe1-name") # (This line doesn't switch, just locates)
driver.switch_to.frame(iframe)
driver.switch_to.frame(iframe1)
assert "We Leave From Here" in driver.page_source

email = driver.find_element(By.ID, "email")
Expand Down
Loading