Comments (15)
Closed by 28762a02ddf5ad23cd4f7f98dfa345eb0299df08.
from splinter.
cooool, hey @nyxtom checkout how cool are these splinter guys. They applied so fast :)
Kudos for @FranciscoSouza
from splinter.
Nice! that's awesome
from splinter.
Opened again, because we need docs :)
from splinter.
it needs a way to come back to main window
from splinter.
Maybe splinter could behave as "pushd" and "popd" shell commands:
browser.push_frame("frame_id1")
... do stuff for the iframe frame_id1
browser.push_frame("frame_foobar")
... do stuff for the iframe frame_foobar
browser.pop_frame()
... do EVEN MORE stuff for the iframe frame_id1
browser.pop_frame()
.... now we are back to main window
-- Gabriel Falcão
2011/4/7 andrewsmedina
[email protected]:
it needs a way to come back to main window
Reply to this email directly or view it on GitHub:
#40 (comment)
from splinter.
Going back to the main window should be as simple as passing in the value of None. This is done in the selenium python driver code by default.
from splinter.
I've updated the documentation to reflect the changes with the latest pull request.
from splinter.
Gabriel, I like this idea of push/pop frame.
from splinter.
Hey, we're thinking about an API like this:
with browser.get_iframe('iframe_id') as iframe:
element = iframe.find_element_by_id('element_id').first
or...
element = in_iframe('iframe_id').find_element_by_id('element_id').first
What do you think?
from splinter.
I like the first better because typically my tests are about switching to a frame and running a lot of interactions in that frame before I am done. The second use case means that I would be duplicating the in_iframe a lot. At least, that's my view on the matter.
from splinter.
in the first case you will be repeat iframe instead in_frame. I think that with in_frame you can do:
iframe = in_frame('iframe_id')
iframe.find_element_by_id('element_id').first
iframe.find_element_by_id('other_element_id').first
from splinter.
Just an adjust:
browser.in_frame('iframe_id')
instead of just
in_frame('iframe_id')
:)
from splinter.
with
approach implemented.
with browser.get_iframe('iframe_id') as iframe:
element = iframe.find_element_by_id('element_id').first
As Selenium only works with iframes changing the context of the driver, we can't implement something like Andrews's examples. I discussed with him and we'll maintain just the with
way, because having to switch to a frame and switch back everytime it's so boring and not pythonic.
Closed.
from splinter.
so how can i go back to the parent window context?
from splinter.
Related Issues (20)
- 👋 From the Selenium project!
- attach_file work with flask? HOT 2
- Browser raise NoneType HOT 7
- Can´t find Iframe HOT 1
- Integration of undetected-chromedriver
- Changelog: Single file? HOT 3
- 'NoneType' object is not callable HOT 2
- We noticed regressions and inconsistencies after migrating from 0.18.1 to 0.19.0 HOT 9
- Cannot send characters directly to the browser HOT 2
- Config cannot be imported HOT 5
- Parallel script execution HOT 2
- Exception when using the latest Selenium HOT 3
- Existing profile is not loaded HOT 3
- selenium.WebDriver no longer accepts desired_capabilities as a kwarg HOT 1
- ValueError: I/O operation on closed file HOT 3
- More type annotations? HOT 1
- Constant error on startup HOT 2
- Launch the browser hidden HOT 1
- Testing and tox.ini environment improvements
- Splinter tests not failing when element not found on the page and wait_time set to 1 second HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from splinter.