{"action":"created","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6225","repository_url":"https://api.github.com/repos/SeleniumHQ/selenium","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6225/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6225/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6225/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/6225","id":345678713,"node_id":"MDU6SXNzdWUzNDU2Nzg3MTM=","number":6225,"title":"Selenium not selecting multiple options On Edge Browser (Windows Build 17134)","user":{"login":"ahmadsayeed","id":41744731,"node_id":"MDQ6VXNlcjQxNzQ0NzMx","avatar_url":"https://avatars0.githubusercontent.com/u/41744731?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmadsayeed","html_url":"https://github.com/ahmadsayeed","followers_url":"https://api.github.com/users/ahmadsayeed/followers","following_url":"https://api.github.com/users/ahmadsayeed/following{/other_user}","gists_url":"https://api.github.com/users/ahmadsayeed/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadsayeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadsayeed/subscriptions","organizations_url":"https://api.github.com/users/ahmadsayeed/orgs","repos_url":"https://api.github.com/users/ahmadsayeed/repos","events_url":"https://api.github.com/users/ahmadsayeed/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadsayeed/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-30T09:25:33Z","updated_at":"2018-09-11T15:46:58Z","closed_at":"2018-08-09T09:58:08Z","author_association":"NONE","body":"## Meta -\r\nOS:  Win 10.0.17134\r\n<!-- Windows 10? OSX? -->\r\nSelenium Version:  3.13.0\r\n<!-- 2.52.0, IDE, etc -->\r\nBrowser:  Microsoft Edge 42.17134.1.0\r\nMicrosoft EdgeHtml 17.17134\r\n<!-- Internet Explorer?  Firefox?\r\n\r\nSince Firefox version 48, Mozilla requires all add-ons to be signed. Until\r\nrecently, Firefox support in Selenium was exclusively provided by an add-on.\r\nAs this add-on is not currently signed, this solution does not work with the\r\nlatest Firefox releases. As an alternative, Mozilla are working on a WebDriver\r\nspecification compliant implementation named GeckoDriver. Please note that the specification is not complete, and that Selenium itself does not comply with\r\nthe specification at this time. This means that features previously available\r\nthrough Selenium will not be available using GeckoDriver.\r\n\r\nAny issue logged here for Firefox 48 or later will be closed as a duplicate of\r\n#2559. Our recommendation is to switch to GeckoDriver, or to continue testing\r\non Firefox 45 until GeckoDriver is a viable option for you. If you are\r\ninterested in helping us to sign the add-on to restore support for later\r\nFirefox versions, please see the following comment for what's needed:\r\nhttps://github.com/SeleniumHQ/selenium/issues/2942#issuecomment-259717567\r\n\r\nIf the issue is with Google Chrome consider logging an issue with chromedriver instead:\r\nhttps://sites.google.com/a/chromium.org/chromedriver/help\r\n\r\nIf the issue is with Microsoft Edge consider logging an issue with Microsoft instead:\r\nhttps://developer.microsoft.com/en-us/microsoft-edge/platform/issues/\r\n\r\nIf the issue is with Firefox GeckoDriver (aka Marionette) consider logging an issue with Mozilla:\r\nhttps://bugzilla.mozilla.org/buglist.cgi?product=Testing&component=Marionette\r\n\r\nIf the issue is with Safari, only Safari 10+ is supported. Please log any Safari issue with Apple:\r\nhttps://bugreport.apple.com/\r\n\r\nIf the issue is with PhantomJS consider logging an issue with Ghostdriver:\r\nhttps://github.com/detro/ghostdriver\r\n\r\n-->\r\n\r\nBrowser Version:  Microsoft Edge 42.17134.1.0\r\n                             Microsoft EdgeHtml 17.17134\r\n<!-- e.g.: 49.0.2623.87 (64-bit) -->\r\n\r\n## Expected Behavior - select all options\r\n\r\n## Actual Behavior - Only selecting the last one.\r\n\r\n## Steps to reproduce - \r\nKindly run this script with selenium environment. \r\n\r\n```\r\nimport java.awt.AWTException;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\n\r\nimport org.openqa.selenium.By;\r\nimport org.openqa.selenium.WebDriver;\r\nimport org.openqa.selenium.WebElement;\r\nimport org.openqa.selenium.edge.EdgeDriver;\r\nimport org.openqa.selenium.support.ui.Select;\r\n\r\npublic class EdgeMultipleSelectFail {\r\n\r\n\tpublic static void main(String[] args) throws InterruptedException, AWTException {\r\n\r\n\t\tSystem.setProperty(\"webdriver.edge.driver\", \"drivers/MicrosoftWebDriver.exe\");\r\n\t\tWebDriver driver = new EdgeDriver();\r\n\r\n\t\tdriver.get(\"https://html.com/attributes/select-multiple/\");\r\n\t\t\r\n\t\tWebElement element = driver.findElement(By.xpath(\"//*[@id='post-291']/div/div[2]/select\"));\r\n\t\tSelect selectData = new Select(element);\r\n\r\n\t\ttry {\r\n\t\t\tString value = \"American flamingo;Andean flamingo;Chilean flamingo;Greater flamingo;James's flamingo;Lesser flamingo\";\r\n\t\t\tString[] values = value.split(\";\");\r\n\t\t\tSystem.out.println(\"********\" + Arrays.toString(values));\r\n\t\t\tList<WebElement> option = element.findElements(By.tagName(\"option\"));\r\n\t\t\tfor (int i = 0; i < values.length; i++) {\r\n\t\t\t\tboolean match = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (WebElement webElement : option) {\r\n\t\t\t\t\t\tif (webElement.getText().equalsIgnoreCase(values[i])) {\r\n\t\t\t\t\t\t\tmatch = true;\r\n\t\t\t\t\t\t\tselectData.selectByVisibleText(values[i]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!match) {\r\n\t\t\t\t\t\tSystem.out.println(\"No Match Found\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.println(\"No Match Found 2\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} finally {\r\n\t\t\tSystem.out.println(\"@@@SID: Inside finally\");\r\n\t\t}\r\n\r\n\t\tThread.sleep(5000);\r\n\r\n\t\tSystem.out.println(\"Let's fetch the selected option again\");\r\n\t\tList<WebElement> selectedOption = selectData.getAllSelectedOptions();\r\n\t\tfor (WebElement ele : selectedOption) {\r\n\t\t\tSystem.out.println(\"After Selection: \" + ele.getText());\r\n\t\t}\r\n\t}\r\n}\r\n\r\n```\r\n\r\n<!--\r\nPlease be sure to include an SSCCE (Short, Self Contained, Correct [compilable] example) http://sscce.org/\r\nIf you can't provide a link to the page, consider creating a reproducible page on https://jsfiddle.net/\r\n-->\r\nI am trying to select all option of select tag using selenium. \r\nIt is working fine at chrome and IE. It is only happening in the case of Edge browser. \r\nI tried to test it on other websites and getting the same response."},"comment":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/comments/420321458","html_url":"https://github.com/SeleniumHQ/selenium/issues/6225#issuecomment-420321458","issue_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6225","id":420321458,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDMyMTQ1OA==","user":{"login":"GitSage","id":7013825,"node_id":"MDQ6VXNlcjcwMTM4MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7013825?v=4","gravatar_id":"","url":"https://api.github.com/users/GitSage","html_url":"https://github.com/GitSage","followers_url":"https://api.github.com/users/GitSage/followers","following_url":"https://api.github.com/users/GitSage/following{/other_user}","gists_url":"https://api.github.com/users/GitSage/gists{/gist_id}","starred_url":"https://api.github.com/users/GitSage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitSage/subscriptions","organizations_url":"https://api.github.com/users/GitSage/orgs","repos_url":"https://api.github.com/users/GitSage/repos","events_url":"https://api.github.com/users/GitSage/events{/privacy}","received_events_url":"https://api.github.com/users/GitSage/received_events","type":"User","site_admin":false},"created_at":"2018-09-11T15:46:58Z","updated_at":"2018-09-11T15:46:58Z","author_association":"NONE","body":"@sivakk2003 what else do you want to know that's not already in the comments? We've explained why it happens, exactly how Edge isn't compliant with the spec, exactly why the Edge team needs to be the ones to fix this, and the OP posted a functioning code sample of a workaround that handles the situation on Edge. \r\n\r\nWhat's your question exactly?"}}
{"actor":{"display_login":"GitSage"}}