{"action":"created","issue":{"url":"https://api.github.com/repos/zalando/zalenium/issues/217","repository_url":"https://api.github.com/repos/zalando/zalenium","labels_url":"https://api.github.com/repos/zalando/zalenium/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/zalando/zalenium/issues/217/comments","events_url":"https://api.github.com/repos/zalando/zalenium/issues/217/events","html_url":"https://github.com/zalando/zalenium/issues/217","id":253528514,"number":217,"title":"zalenium+android emulator: matching capability on android browser than zalenium browser","user":{"login":"MilindThakur","id":5360933,"avatar_url":"https://avatars1.githubusercontent.com/u/5360933?v=4","gravatar_id":"","url":"https://api.github.com/users/MilindThakur","html_url":"https://github.com/MilindThakur","followers_url":"https://api.github.com/users/MilindThakur/followers","following_url":"https://api.github.com/users/MilindThakur/following{/other_user}","gists_url":"https://api.github.com/users/MilindThakur/gists{/gist_id}","starred_url":"https://api.github.com/users/MilindThakur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MilindThakur/subscriptions","organizations_url":"https://api.github.com/users/MilindThakur/orgs","repos_url":"https://api.github.com/users/MilindThakur/repos","events_url":"https://api.github.com/users/MilindThakur/events{/privacy}","received_events_url":"https://api.github.com/users/MilindThakur/received_events","type":"User","site_admin":false},"labels":[{"id":454851628,"url":"https://api.github.com/repos/zalando/zalenium/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":454851629,"url":"https://api.github.com/repos/zalando/zalenium/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-29T04:49:00Z","updated_at":"2018-02-08T21:16:00Z","closed_at":null,"author_association":"NONE","body":"We are staring a selenium grid using Zalenium and android-emulator (image: butomo1989/docker-android-x86-7.1.1) with the following docker-compose.yml.\r\n\r\n```\r\n# Note this users version 2.1 which means it requires docker-compose 1.9\r\n#\r\n# Usage:\r\n#   docker-compose up --force-recreate\r\nversion: '2.1'\r\n\r\nservices:\r\n  #--------------#\r\n   zalenium:\r\n    image: \"dosel/zalenium\"\r\n    container_name: zalenium\r\n    hostname: zalenium\r\n    privileged: true\r\n    tty: true\r\n    volumes:\r\n      - /var/run/docker.sock:/var/run/docker.sock\r\n      - /usr/bin/docker:/usr/bin/docker\r\n    ports:\r\n      - 4444:4444\r\n    command: >\r\n      start --chromeContainers 0\r\n            --firefoxContainers 0\r\n            --maxDockerSeleniumContainers 10\r\n            --screenWidth 1930 --screenHeight 1090\r\n            --timeZone \"Pacific/Auckland\"\r\n            --videoRecordingEnabled false\r\n            --sauceLabsEnabled false\r\n            --browserStackEnabled false\r\n            --testingBotEnabled false\r\n            --startTunnel false\r\n            --sendAnonymousUsageInfo false\r\n            --debugEnabled true\r\n    environment:\r\n      - SAUCE_USERNAME\r\n      - SAUCE_ACCESS_KEY\r\n      - BROWSER_STACK_USER\r\n      - BROWSER_STACK_KEY\r\n      - TESTINGBOT_KEY\r\n      - TESTINGBOT_SECRET \r\n      \r\n  samsung_galaxy_S6_Chrome:\r\n    image: butomo1989/docker-android-x86-7.1.1\r\n    container_name: Samsung_Galaxy_S6_Chrome\r\n    hostname: Samsung_Galaxy_S6_Chrome\r\n    privileged: true\r\n    scale: 1\r\n    ports:\r\n      - 6080\r\n    links:\r\n      - \"zalenium\"\r\n    environment:\r\n      - DEVICE=Samsung Galaxy S6\r\n      - CONNECT_TO_GRID=True\r\n      - MOBILE_WEB_TEST=True\r\n      - APPIUM=True\r\n      - SELENIUM_HOST=zalenium    \r\n```\r\nWhen I try to create a new instance of a chrome browser on Zalenium with following capabilities, \r\n```\r\ndesired_caps2 = {}\r\ndesired_caps2['version'] = ''\r\ndesired_caps2['platform'] = 'LINUX'\r\ndesired_caps2['browserName'] = 'chrome'\r\ndriver = webdriver.Remote('http://localhost:4444/wd/hub', desired_caps2)\r\n```\r\nI get an error \r\n`selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: You must include a platformName capability`\r\nAnd Zalenium log reports\r\n```\r\nzalenium                    | 11:58:47.245 INFO - Got a request to create a new session: Capabilities [{browserName=chrome, version=latest, platform=LINUX}]\r\nzalenium                    | 11:58:47.246 DEBUG - Validating {browserName=chrome, version=latest, platform=LINUX} in node with capabilities {browserName=firefox, maxInstances=1, version=52.0.2, platform=LINUX}\r\nzalenium                    | 11:58:47.248 DEBUG - Validating {browserName=chrome, version=latest, platform=LINUX} in node with capabilities {browserName=chrome, maxInstances=1, version=60.0.3112.90, platform=LINUX}\r\nzalenium                    | 11:58:47.248 DEBUG - Available nodes: [http://172.18.0.3:4723, http://172.18.0.2:30000]\r\nzalenium                    | 11:58:47.248 DEBUG - Trying to create a new session on node http://172.18.0.3:4723\r\nzalenium                    | 11:58:47.248 INFO - Trying to create a new session on test slot {browserName=chrome, platformName=Android, maxInstances=1, deviceName=samsung_galaxy_s6_7.1.1, version=7.1.1, platform=ANDROID}\r\n```\r\nWhich seem to be trying to match to the Android emulator instead. But if I specify \"Firefox\" as the \"browserName\", the grid picks it up and spins up a new docker container (using zalenium) with firefox browser. Also, if I specify the version to be exactly the one used by zalenium, capability matching works and it spins a new zalenium chrome container.\r\n\r\nI can launch the android browser successfully using following capability:\r\n```\r\ndesired_caps3 = {}\r\ndesired_caps3['platformName'] = 'Android'\r\ndesired_caps3['version'] = '7.1.1'\r\ndesired_caps3['platform'] = 'ANDROID'\r\ndesired_caps3['deviceName'] = 'samsung_galaxy_s6_7.1.1'\r\ndesired_caps3['deviceName'] = 'Android Emulator'\r\ndesired_caps3['browserName'] = 'chrome'\r\ndriver4 = webdriver.Remote('http://localhost:4444/wd/hub', desired_caps3)\r\n```\r\nWhen only Zalenium is active, the logs show that it checks for 'version' in the requestedCapabilities, and if 'latest' it removes it from the capability and matches again. But I don't see this being removed and matched when appium-android node is present in the grid\r\n\r\n```\r\nzalenium    | 11:57:34.439 INFO - Got a request to create a new session: Capabilities [{browserName=chrome, version=latest, platform=LINUX}]\r\nzalenium    | 11:57:34.440 DEBUG - Validating {browserName=chrome, version=latest, platform=LINUX} in node with capabilities {browserName=firefox, maxInstances=1, version=52.0.2, platform=LINUX}\r\nzalenium    | 11:57:34.442 DEBUG - Validating {browserName=chrome, version=latest, platform=LINUX} in node with capabilities {browserName=chrome, maxInstances=1, version=60.0.3112.90, platform=LINUX}\r\nzalenium    | 11:57:34.442 DEBUG - Available nodes: [http://172.18.0.2:30000]\r\nzalenium    | 11:57:34.442 DEBUG - Validating {browserName=chrome, platform=LINUX} in node with capabilities {browserName=firefox, maxInstances=1, version=52.0.2, platform=LINUX}\r\nzalenium    | 11:57:34.443 DEBUG - Validating {browserName=chrome, platform=LINUX} in node with capabilities {browserName=chrome, maxInstances=1, version=60.0.3112.90, platform=LINUX}\r\nzalenium    | 11:57:34.443 INFO - [DS] Starting new node for {tz=Pacific/Auckland, browserName=chrome, screenResolution=1930x1090, platform=LINUX}.\r\nzalenium    | 11:57:34.494 DEBUG - [DS]  0 docker-selenium containers running\r\n```\r\n\r\nIt seem that it only matches on a \"browserName\" fist even if the \"platform\" is \"LINUX\" and not \"ANDROID\". As I understand, using Zalenium I should be able to add any node to the grid as I would normally do.\r\n\r\nBTW, thanks heaps for this project. Having this on-demand test infrastructure really helps with CI-CD."},"comment":{"url":"https://api.github.com/repos/zalando/zalenium/issues/comments/364250771","html_url":"https://github.com/zalando/zalenium/issues/217#issuecomment-364250771","issue_url":"https://api.github.com/repos/zalando/zalenium/issues/217","id":364250771,"user":{"login":"diemol","id":5992658,"avatar_url":"https://avatars1.githubusercontent.com/u/5992658?v=4","gravatar_id":"","url":"https://api.github.com/users/diemol","html_url":"https://github.com/diemol","followers_url":"https://api.github.com/users/diemol/followers","following_url":"https://api.github.com/users/diemol/following{/other_user}","gists_url":"https://api.github.com/users/diemol/gists{/gist_id}","starred_url":"https://api.github.com/users/diemol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diemol/subscriptions","organizations_url":"https://api.github.com/users/diemol/orgs","repos_url":"https://api.github.com/users/diemol/repos","events_url":"https://api.github.com/users/diemol/events{/privacy}","received_events_url":"https://api.github.com/users/diemol/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T21:16:00Z","updated_at":"2018-02-08T21:16:00Z","author_association":"MEMBER","body":"Hi @aberonni, thanks for the nice words!\r\n\r\n\r\nWe have been looking into it recently, thinking what would be the best way to have it. Considering things like how long does the emulator takes to start and so on, perhaps starting one per test would not be really fast and then it would block people instead of helping. \r\n\r\nBut no, there is no ETA. No one internally needs this feature, so we are not doing this during office hours. Basically doing it in our free time, that's why there is no ETA. \r\n\r\nWhen we advance on it, we'll post updates here."}}
{"actor":{"display_login":"diemol"}}