File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
dotnet/SeleniumDocs/Interactions
java/src/test/java/dev/selenium/interactions
python/tests/interactions Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ public void TestFrames()
4848
4949
5050 //switch To IFrame using name or id
51- driver . FindElement ( By . Name ( "iframe1-name" ) ) ;
51+ IWebElement iframe1 = driver . FindElement ( By . Name ( "iframe1-name" ) ) ;
5252 //Switch to the frame
53- driver . SwitchTo ( ) . Frame ( iframe ) ;
53+ driver . SwitchTo ( ) . Frame ( iframe1 ) ;
5454 Assert . AreEqual ( true , driver . PageSource . Contains ( "We Leave From Here" ) ) ;
5555 IWebElement email = driver . FindElement ( By . Id ( "email" ) ) ;
5656 //Now we can type text into email field
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ public void informationWithElements() {
4848
4949
5050 //switch To IFrame using name or id
51- driver .findElement (By .name ("iframe1-name" ));
51+ WebElement iframe1 = driver .findElement (By .name ("iframe1-name" ));
5252 //Switch to the frame
53- driver .switchTo ().frame (iframe );
53+ driver .switchTo ().frame (iframe1 );
5454 assertEquals (true , driver .getPageSource ().contains ("We Leave From Here" ));
5555 WebElement email = driver .findElement (By .id ("email" ));
5656 //Now we can type text into email field
Original file line number Diff line number Diff line change 3333
3434# --- Switch to iframe using name or ID ---
3535iframe1 = driver .find_element (By .NAME , "iframe1-name" ) # (This line doesn't switch, just locates)
36- driver .switch_to .frame (iframe )
36+ driver .switch_to .frame (iframe1 )
3737assert "We Leave From Here" in driver .page_source
3838
3939email = driver .find_element (By .ID , "email" )
You can’t perform that action at this time.
0 commit comments