Skip to content
b385e3e
Compare
Choose a tag to compare
7191a8c
Compare
Choose a tag to compare
242eb4d
Compare
Choose a tag to compare

iframe methods and more

Here's the full list of iframe method now (some already existed):

self.switch_to_frame(frame, timeout=None)

self.switch_to_default_content()

self.switch_to_parent_frame()

self.set_content_to_frame(frame, timeout=None)

self.set_content_to_default(nested=False)
# Duplicates: self.set_content_to_default_content(nested=False)

self.set_content_to_parent()
# Duplicates: self.set_content_to_parent_frame()

For an example of these methods in action, see: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_iframes.py

If locating an element by the :contains("TEXT") selector and the element is not found, then the output will display that selector in CSS Selector format (rather than in the messy XPath format that the selector was converted to prior to being used). Note that the :contains("TEXT") CSS Selector is only valid in SeleniumBase, as it converts that into a valid XPath Selector before using it in a regular Selenium command.
Eg: 'div:contains("Math")' in SeleniumBase CSS becomes "//div[contains(., 'Math')]" in XPath.

d665365
Compare
Choose a tag to compare
31ab13f
Compare
Choose a tag to compare
0add9ec
Compare
Choose a tag to compare
2ff791e
Compare
Choose a tag to compare
5514d06
Compare
Choose a tag to compare
666a70d
Compare
Choose a tag to compare
20bad75
Compare
Choose a tag to compare