{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium/issues/78","repository_url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium","labels_url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium/issues/78/comments","events_url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium/issues/78/events","html_url":"https://github.com/NativeScript/nativescript-dev-appium/issues/78","id":285292805,"number":78,"title":"How to use the same instance of the driver in different files","user":{"login":"gkvappium","id":27851378,"avatar_url":"https://avatars1.githubusercontent.com/u/27851378?v=4","gravatar_id":"","url":"https://api.github.com/users/gkvappium","html_url":"https://github.com/gkvappium","followers_url":"https://api.github.com/users/gkvappium/followers","following_url":"https://api.github.com/users/gkvappium/following{/other_user}","gists_url":"https://api.github.com/users/gkvappium/gists{/gist_id}","starred_url":"https://api.github.com/users/gkvappium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkvappium/subscriptions","organizations_url":"https://api.github.com/users/gkvappium/orgs","repos_url":"https://api.github.com/users/gkvappium/repos","events_url":"https://api.github.com/users/gkvappium/events{/privacy}","received_events_url":"https://api.github.com/users/gkvappium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-01-01T07:15:46Z","updated_at":"2018-02-08T20:47:26Z","closed_at":null,"author_association":"NONE","body":"Hi ,\r\n\r\nWhen we use this\r\nlet driver:AppiumDriver;\r\ndriver = await createDriver();\r\n\r\nEach time we open the driver.\r\n\r\nI have created multiple page object files (Page object modelling) and different test case files. I need to use the instance of the driver in each of these files without opening multiple driver sessions. At the moment this in an async call (using await). How can I create a constructor since constructor returns an instance of the class and an async call will return a promise. \r\n\r\nAlso if I want to have the elements in a separate file, it seems to be a problem because of asynchronous await.\r\n\r\n@SvetoslavTsenov @vchimev can you please have a look?"},"comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium/issues/comments/364243282","html_url":"https://github.com/NativeScript/nativescript-dev-appium/issues/78#issuecomment-364243282","issue_url":"https://api.github.com/repos/NativeScript/nativescript-dev-appium/issues/78","id":364243282,"user":{"login":"SvetoslavTsenov","id":3598759,"avatar_url":"https://avatars0.githubusercontent.com/u/3598759?v=4","gravatar_id":"","url":"https://api.github.com/users/SvetoslavTsenov","html_url":"https://github.com/SvetoslavTsenov","followers_url":"https://api.github.com/users/SvetoslavTsenov/followers","following_url":"https://api.github.com/users/SvetoslavTsenov/following{/other_user}","gists_url":"https://api.github.com/users/SvetoslavTsenov/gists{/gist_id}","starred_url":"https://api.github.com/users/SvetoslavTsenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvetoslavTsenov/subscriptions","organizations_url":"https://api.github.com/users/SvetoslavTsenov/orgs","repos_url":"https://api.github.com/users/SvetoslavTsenov/repos","events_url":"https://api.github.com/users/SvetoslavTsenov/events{/privacy}","received_events_url":"https://api.github.com/users/SvetoslavTsenov/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T20:47:26Z","updated_at":"2018-02-08T20:47:26Z","author_association":"CONTRIBUTOR","body":"Hey @gkvappium  if you could share your project, it would be great for me. Please, have in mind that this could probably took a time because at the moment we are quite busy. I will try to provide you with a solution as soon as possible."}}
{"actor":{"display_login":"SvetoslavTsenov"}}