File tree 6 files changed +78
-12
lines changed
docs_source_files/content/webdriver 6 files changed +78
-12
lines changed Original file line number Diff line number Diff line change @@ -567,7 +567,14 @@ driver.SwitchTo().Frame(iframe);
567
567
driver.FindElement(By.TagName("button")).Click();
568
568
{{< / code-panel >}}
569
569
{{< code-panel language="ruby" >}}
570
- # We don't have a Ruby code sample yet - Help us out and raise a PR
570
+ # Store iframe web element
571
+ iframe = driver.find_element(: css ,'#modal > iframe')
572
+
573
+ # Switch to the frame
574
+ driver.switch_to.frame iframe
575
+
576
+ # Now, Click on the button
577
+ driver.find_element(: tag_name ,'button').click
571
578
{{< / code-panel >}}
572
579
{{< code-panel language="javascript" >}}
573
580
// Store the web element
@@ -611,7 +618,11 @@ driver.SwitchTo().Frame("myframe");
611
618
driver.FindElement(By.TagName("button")).Click();
612
619
{{< / code-panel >}}
613
620
{{< code-panel language="ruby" >}}
614
- # We don't have a Ruby code sample yet - Help us out and raise a PR
621
+ # Switch by ID
622
+ driver.switch_to.frame 'buttonframe'
623
+
624
+ # Now, Click on the button
625
+ driver.find_element(: tag_name ,'button').click
615
626
{{< / code-panel >}}
616
627
{{< code-panel language="javascript" >}}
617
628
// Using the ID
Original file line number Diff line number Diff line change @@ -573,7 +573,14 @@ driver.SwitchTo().Frame(iframe);
573
573
driver.FindElement(By.TagName("button")).Click();
574
574
{{< / code-panel >}}
575
575
{{< code-panel language="ruby" >}}
576
- # We don't have a Ruby code sample yet - Help us out and raise a PR
576
+ # Store iframe web element
577
+ iframe = driver.find_element(: css ,'#modal > iframe')
578
+
579
+ # Switch to the frame
580
+ driver.switch_to.frame iframe
581
+
582
+ # Now, Click on the button
583
+ driver.find_element(: tag_name ,'button').click
577
584
{{< / code-panel >}}
578
585
{{< code-panel language="javascript" >}}
579
586
// Store the web element
@@ -617,7 +624,11 @@ driver.SwitchTo().Frame("myframe");
617
624
driver.FindElement(By.TagName("button")).Click();
618
625
{{< / code-panel >}}
619
626
{{< code-panel language="ruby" >}}
620
- # We don't have a Ruby code sample yet - Help us out and raise a PR
627
+ # Switch by ID
628
+ driver.switch_to.frame 'buttonframe'
629
+
630
+ # Now, Click on the button
631
+ driver.find_element(: tag_name ,'button').click
621
632
{{< / code-panel >}}
622
633
{{< code-panel language="javascript" >}}
623
634
// Using the ID
Original file line number Diff line number Diff line change @@ -573,7 +573,14 @@ driver.SwitchTo().Frame(iframe);
573
573
driver.FindElement(By.TagName("button")).Click();
574
574
{{< / code-panel >}}
575
575
{{< code-panel language="ruby" >}}
576
- # We don't have a Ruby code sample yet - Help us out and raise a PR
576
+ # Store iframe web element
577
+ iframe = driver.find_element(: css ,'#modal > iframe')
578
+
579
+ # Switch to the frame
580
+ driver.switch_to.frame iframe
581
+
582
+ # Now, Click on the button
583
+ driver.find_element(: tag_name ,'button').click
577
584
{{< / code-panel >}}
578
585
{{< code-panel language="javascript" >}}
579
586
// Store the web element
@@ -617,7 +624,11 @@ driver.SwitchTo().Frame("myframe");
617
624
driver.FindElement(By.TagName("button")).Click();
618
625
{{< / code-panel >}}
619
626
{{< code-panel language="ruby" >}}
620
- # We don't have a Ruby code sample yet - Help us out and raise a PR
627
+ # Switch by ID
628
+ driver.switch_to.frame 'buttonframe'
629
+
630
+ # Now, Click on the button
631
+ driver.find_element(: tag_name ,'button').click
621
632
{{< / code-panel >}}
622
633
{{< code-panel language="javascript" >}}
623
634
// Using the ID
Original file line number Diff line number Diff line change @@ -571,7 +571,14 @@ driver.SwitchTo().Frame(iframe);
571
571
driver.FindElement(By.TagName("button")).Click();
572
572
{{< / code-panel >}}
573
573
{{< code-panel language="ruby" >}}
574
- # We don't have a Ruby code sample yet - Help us out and raise a PR
574
+ # Store iframe web element
575
+ iframe = driver.find_element(: css ,'#modal > iframe')
576
+
577
+ # Switch to the frame
578
+ driver.switch_to.frame iframe
579
+
580
+ # Now, Click on the button
581
+ driver.find_element(: tag_name ,'button').click
575
582
{{< / code-panel >}}
576
583
{{< code-panel language="javascript" >}}
577
584
// Store the web element
@@ -615,7 +622,11 @@ driver.SwitchTo().Frame("myframe");
615
622
driver.FindElement(By.TagName("button")).Click();
616
623
{{< / code-panel >}}
617
624
{{< code-panel language="ruby" >}}
618
- # We don't have a Ruby code sample yet - Help us out and raise a PR
625
+ # Switch by ID
626
+ driver.switch_to.frame 'buttonframe'
627
+
628
+ # Now, Click on the button
629
+ driver.find_element(: tag_name ,'button').click
619
630
{{< / code-panel >}}
620
631
{{< code-panel language="javascript" >}}
621
632
// Using the ID
Original file line number Diff line number Diff line change @@ -573,7 +573,14 @@ driver.SwitchTo().Frame(iframe);
573
573
driver.FindElement(By.TagName("button")).Click();
574
574
{{< / code-panel >}}
575
575
{{< code-panel language="ruby" >}}
576
- # We don't have a Ruby code sample yet - Help us out and raise a PR
576
+ # Store iframe web element
577
+ iframe = driver.find_element(: css ,'#modal > iframe')
578
+
579
+ # Switch to the frame
580
+ driver.switch_to.frame iframe
581
+
582
+ # Now, Click on the button
583
+ driver.find_element(: tag_name ,'button').click
577
584
{{< / code-panel >}}
578
585
{{< code-panel language="javascript" >}}
579
586
// Store the web element
@@ -617,7 +624,11 @@ driver.SwitchTo().Frame("myframe");
617
624
driver.FindElement(By.TagName("button")).Click();
618
625
{{< / code-panel >}}
619
626
{{< code-panel language="ruby" >}}
620
- # We don't have a Ruby code sample yet - Help us out and raise a PR
627
+ # Switch by ID
628
+ driver.switch_to.frame 'buttonframe'
629
+
630
+ # Now, Click on the button
631
+ driver.find_element(: tag_name ,'button').click
621
632
{{< / code-panel >}}
622
633
{{< code-panel language="javascript" >}}
623
634
// Using the ID
Original file line number Diff line number Diff line change @@ -572,7 +572,14 @@ driver.SwitchTo().Frame(iframe);
572
572
driver.FindElement(By.TagName("button")).Click();
573
573
{{< / code-panel >}}
574
574
{{< code-panel language="ruby" >}}
575
- # We don't have a Ruby code sample yet - Help us out and raise a PR
575
+ # Store iframe web element
576
+ iframe = driver.find_element(: css ,'#modal > iframe')
577
+
578
+ # Switch to the frame
579
+ driver.switch_to.frame iframe
580
+
581
+ # Now, Click on the button
582
+ driver.find_element(: tag_name ,'button').click
576
583
{{< / code-panel >}}
577
584
{{< code-panel language="javascript" >}}
578
585
// Store the web element
@@ -616,7 +623,11 @@ driver.SwitchTo().Frame("myframe");
616
623
driver.FindElement(By.TagName("button")).Click();
617
624
{{< / code-panel >}}
618
625
{{< code-panel language="ruby" >}}
619
- # We don't have a Ruby code sample yet - Help us out and raise a PR
626
+ # Switch by ID
627
+ driver.switch_to.frame 'buttonframe'
628
+
629
+ # Now, Click on the button
630
+ driver.find_element(: tag_name ,'button').click
620
631
{{< / code-panel >}}
621
632
{{< code-panel language="javascript" >}}
622
633
// Using the ID
You can’t perform that action at this time.
0 commit comments