{"action":"created","issue":{"url":"https://api.github.com/repos/angular/protractor/issues/4916","repository_url":"https://api.github.com/repos/angular/protractor","labels_url":"https://api.github.com/repos/angular/protractor/issues/4916/labels{/name}","comments_url":"https://api.github.com/repos/angular/protractor/issues/4916/comments","events_url":"https://api.github.com/repos/angular/protractor/issues/4916/events","html_url":"https://github.com/angular/protractor/issues/4916","id":349886841,"node_id":"MDU6SXNzdWUzNDk4ODY4NDE=","number":4916,"title":"CSS does not load properly if there are any assert statements related to iframe","user":{"login":"autowala","id":42264576,"node_id":"MDQ6VXNlcjQyMjY0NTc2","avatar_url":"https://avatars0.githubusercontent.com/u/42264576?v=4","gravatar_id":"","url":"https://api.github.com/users/autowala","html_url":"https://github.com/autowala","followers_url":"https://api.github.com/users/autowala/followers","following_url":"https://api.github.com/users/autowala/following{/other_user}","gists_url":"https://api.github.com/users/autowala/gists{/gist_id}","starred_url":"https://api.github.com/users/autowala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autowala/subscriptions","organizations_url":"https://api.github.com/users/autowala/orgs","repos_url":"https://api.github.com/users/autowala/repos","events_url":"https://api.github.com/users/autowala/events{/privacy}","received_events_url":"https://api.github.com/users/autowala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-13T04:50:13Z","updated_at":"2018-08-14T14:15:39Z","closed_at":null,"author_association":"NONE","body":"I have to test drag and drop functionality in a iframe. We can generate forms using this functionality.\r\nThe left side of the iframe holds the widgets and the empty container in the middile and a form to the right.\r\n\r\nTestCase: Dropping a 'Text Area' or any widget should load a new form with radio buttons, few input fields and a unique string dynamically (using Jquery). This form varies from widget to widget. \r\n\r\nThis dynamic form is not loading properly in some cases. **The radio buttons are displayed as input field of type text.**\r\n\r\nWhat I observed is that the rendering of this form fails if I am trying to perform any element presence or trying to use getText(), isPresent() or sendKeys() (on the elements inside the iframe) after switching into the iframe.\r\n\r\nScenario 1: OK\r\nForm is loading properly\r\n`var widgets = element.all(by.css('css'));\r\nvar emptyContainer = element.all(by.id('id'));\r\n widgets.each(function(widget){\r\nbrowser.actions().mouseDown(widget).mouseMove(emptyContainer).mouseUp().perform();\r\n});\r\n`\r\n\r\nScenario 2: FAIL\r\n In this case, the form and it's components(radio buttons, unique number)  are loaded properly for the first iteration and for the rest(12) the radio buttons are loaded as input field of type text. You can see I am testing radio button presence for each widget.\r\n`browser.driver.switchTo() .frame('frameName').then(function(){\r\nvar widgets = element.all(by.css('css'));\r\nvar emptyContainer = element.all(by.id('id'));\r\n widgets.each(function(widget){\r\nbrowser.actions()\r\n.mouseDown(widget)\r\n.mouseMove(emptyContainer)\r\n.mouseUp()\r\n.perform()\r\nthen(function(){\r\nvar radioButton = element(by.css('css'));\r\nradioButton.isPresent().then(function(ispresent){\r\nexpect(ispresent).toBe(true);\r\n});\r\n});\r\n})\r\n});\r\n`\r\n\r\n\r\nScenario 3: FAIL\r\nIn this case I am trying to find if a widget is present or not. I am doing this before performing drag&drop.\r\n`browser.driver.switchTo() .frame('frameName').then(function(){`\r\n`var widgets = element.all(by.css('css'));`\r\n`var textAreaWidget = element(by.id('id'));`\r\n`textAreaWidget .isPresent().then(function(ispresent){`\r\n`expect(ispresent).toBe(true);`\r\n`});`\r\n`var emptyContainer = element.all(by.id('id'));`\r\n `widgets.each(function(widget){`\r\n`browser.actions()`\r\n`.mouseDown(widget)`\r\n`.mouseMove(emptyContainer)`\r\n`.mouseUp()`\r\n`.perform()`\r\n`then(function(){`\r\n`var radioButton = element(by.css('css'));`\r\n`radioButton.isPresent().then(function(ispresent){`\r\n`expect(ispresent).toBe(true);`\r\n`});`\r\n`});`\r\n`})`\r\n`});`\r\n\r\n\r\nThe jquery execution is terminated somehow if I am trying to do anything other than dropping the widgets. Is there any way to wait for jquery to complete it's execution on  iframe?\r\n\r\nBug report\r\n---\r\n\r\n- Node Version: `8.11.3`\r\n- Protractor Version: `5.3.2`\r\n- Browser(s): `chrome 67.0.3396.99`\r\n- webdriver-manager: `12.1.0`\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/protractor/issues/comments/412887070","html_url":"https://github.com/angular/protractor/issues/4916#issuecomment-412887070","issue_url":"https://api.github.com/repos/angular/protractor/issues/4916","id":412887070,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjg4NzA3MA==","user":{"login":"autowala","id":42264576,"node_id":"MDQ6VXNlcjQyMjY0NTc2","avatar_url":"https://avatars0.githubusercontent.com/u/42264576?v=4","gravatar_id":"","url":"https://api.github.com/users/autowala","html_url":"https://github.com/autowala","followers_url":"https://api.github.com/users/autowala/followers","following_url":"https://api.github.com/users/autowala/following{/other_user}","gists_url":"https://api.github.com/users/autowala/gists{/gist_id}","starred_url":"https://api.github.com/users/autowala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autowala/subscriptions","organizations_url":"https://api.github.com/users/autowala/orgs","repos_url":"https://api.github.com/users/autowala/repos","events_url":"https://api.github.com/users/autowala/events{/privacy}","received_events_url":"https://api.github.com/users/autowala/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T14:15:39Z","updated_at":"2018-08-14T14:15:39Z","author_association":"NONE","body":"```\r\nvar radioButton = element(by.css('css'));\r\nradioButton.isPresent().then(function(ispresent){\r\nexpect(ispresent).toBe(true);\r\n```\r\n\r\nPlease take a look at the initial comment to know where I am using this code.\r\n"}}
{"actor":{"display_login":"autowala"}}