{"action":"closed","issue":{"url":"https://api.github.com/repos/cobrateam/splinter/issues/411","repository_url":"https://api.github.com/repos/cobrateam/splinter","labels_url":"https://api.github.com/repos/cobrateam/splinter/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/cobrateam/splinter/issues/411/comments","events_url":"https://api.github.com/repos/cobrateam/splinter/issues/411/events","html_url":"https://github.com/cobrateam/splinter/issues/411","id":88639492,"node_id":"MDU6SXNzdWU4ODYzOTQ5Mg==","number":411,"title":"Can't access outer iframe after accessing nested iframe in context manager","user":{"login":"adambrenecki","id":473960,"node_id":"MDQ6VXNlcjQ3Mzk2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/473960?v=4","gravatar_id":"","url":"https://api.github.com/users/adambrenecki","html_url":"https://github.com/adambrenecki","followers_url":"https://api.github.com/users/adambrenecki/followers","following_url":"https://api.github.com/users/adambrenecki/following{/other_user}","gists_url":"https://api.github.com/users/adambrenecki/gists{/gist_id}","starred_url":"https://api.github.com/users/adambrenecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adambrenecki/subscriptions","organizations_url":"https://api.github.com/users/adambrenecki/orgs","repos_url":"https://api.github.com/users/adambrenecki/repos","events_url":"https://api.github.com/users/adambrenecki/events{/privacy}","received_events_url":"https://api.github.com/users/adambrenecki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-06-16T07:00:08Z","updated_at":"2018-08-27T01:02:19Z","closed_at":"2018-08-27T01:02:19Z","author_association":"NONE","body":"Hi,\n\nI'm trying to use Splinter automate something on a site that's structured something like this:\n\n```\ntop level page\n| iframe\n| | iframe\n| | | form widgets\n| | submit button\n```\n\n(This is exactly as fun as it looks, by the way.)\n\nIf I write my code like this:\n\n``` python\n    with browser.get_iframe('outerframe') as outer_iframe:\n        with outer_iframe.get_iframe('innerframe') as iframe:\n            iframe.find_by_id('field1').first.fill('value')\n            iframe.find_by_id('field2').first.fill('value')\n\n        outer_iframe.find_by_id('button').first.click()\n```\n\nI get an exception like this:\n\n```\nsplinter.exceptions.ElementDoesNotExist: no elements could be found with id \"button\"\n```\n\nBut if I write my code like this, it works:\n\n``` python\n    with browser.get_iframe('outerframe') as outer_iframe:\n        with outer_iframe.get_iframe('innerframe') as iframe:\n            iframe.find_by_id('field1').first.fill('value')\n            iframe.find_by_id('field2').first.fill('value')\n\n    with browser.get_iframe('outerframe') as outer_iframe:\n        outer_iframe.find_by_id('button').first.click()\n```\n\n(As an aside, Splinter is amazing, it's made my life a lot easier today, thanks!)\n"}}
{"actor":{"display_login":"andrewsmedina"}}