browserstack-local 1.2.6__tar.gz → 1.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. browserstack-local-1.2.8/PKG-INFO +156 -0
  2. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack/local_binary.py +3 -2
  3. browserstack-local-1.2.8/browserstack_local.egg-info/PKG-INFO +156 -0
  4. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/setup.py +3 -1
  5. browserstack-local-1.2.6/PKG-INFO +0 -12
  6. browserstack-local-1.2.6/browserstack_local.egg-info/PKG-INFO +0 -12
  7. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/LICENSE.txt +0 -0
  8. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/MANIFEST.in +0 -0
  9. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/README +0 -0
  10. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/README.md +0 -0
  11. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack/__init__.py +0 -0
  12. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack/bserrors.py +0 -0
  13. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack/local.py +0 -0
  14. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack_local.egg-info/SOURCES.txt +0 -0
  15. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack_local.egg-info/dependency_links.txt +0 -0
  16. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack_local.egg-info/requires.txt +0 -0
  17. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/browserstack_local.egg-info/top_level.txt +0 -0
  18. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/setup.cfg +0 -0
  19. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/tests/__init__.py +0 -0
  20. {browserstack-local-1.2.6 → browserstack-local-1.2.8}/tests/test_local.py +0 -0
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.1
2
+ Name: browserstack-local
3
+ Version: 1.2.8
4
+ Summary: Python bindings for Browserstack Local
5
+ Home-page: https://github.com/browserstack/browserstack-local-python
6
+ Download-URL: https://github.com/browserstack/browserstack-local-python/archive/master.zip
7
+ Author: BrowserStack
8
+ Author-email: support@browserstack.com
9
+ Keywords: BrowserStack,Local,selenium,testing
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ Requires-Dist: psutil
13
+
14
+ # browserstack-local-python
15
+
16
+ [![Build Status](https://travis-ci.org/browserstack/browserstack-local-python.svg?branch=master)](https://travis-ci.org/browserstack/browserstack-local-python)
17
+
18
+ Python bindings for BrowserStack Local.
19
+
20
+ ## Installation
21
+
22
+ ```sh
23
+ pip install browserstack-local
24
+ ```
25
+
26
+ ## Example
27
+
28
+ ```python
29
+ from browserstack.local import Local
30
+
31
+ #creates an instance of Local
32
+ bs_local = Local()
33
+
34
+ #replace <browserstack-accesskey> with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY".
35
+ bs_local_args = { "key": "<browserstack-accesskey>" }
36
+
37
+ #starts the Local instance with the required arguments
38
+ bs_local.start(**bs_local_args)
39
+
40
+ #check if BrowserStack local instance is running
41
+ print(bs_local.isRunning())
42
+
43
+ #stop the Local instance
44
+ bs_local.stop()
45
+
46
+ ```
47
+
48
+ ## Arguments
49
+
50
+ Apart from the key, all other BrowserStack Local modifiers are optional. For the full list of modifiers, refer [BrowserStack Local modifiers](https://www.browserstack.com/local-testing#modifiers). For examples, refer below -
51
+
52
+ #### Verbose Logging
53
+ To enable verbose logging -
54
+ ```sh
55
+ bs_local_args = { "key": "<browserstack-accesskey>" , "v": "true"}
56
+ ```
57
+
58
+ #### Folder Testing
59
+ To test local folder rather internal server, provide path to folder as value of this option -
60
+ ```sh
61
+ bs_local_args = { "key": "<browserstack-accesskey>" , "f": "/my/awesome/folder"}
62
+ ```
63
+
64
+ #### Force Start
65
+ To kill other running Browserstack Local instances -
66
+ ```sh
67
+ bs_local_args = { "key": "<browserstack-accesskey>" , "force": "true"}
68
+ ```
69
+
70
+ #### Only Automate
71
+ To disable local testing for Live and Screenshots, and enable only Automate -
72
+ ```sh
73
+ bs_local_args = { "key": "<browserstack-accesskey>" , "onlyAutomate": "true"}
74
+ ```
75
+
76
+ #### Force Local
77
+ To route all traffic via local(your) machine -
78
+ ```sh
79
+ bs_local_args = { "key": "<browserstack-accesskey>" , "forcelocal": "true"}
80
+ ```
81
+
82
+ #### Proxy
83
+ To use a proxy for local testing -
84
+
85
+ * proxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
86
+ * proxyPort: Port for the proxy, defaults to 3128 when -proxyHost is used
87
+ * proxyUser: Username for connecting to proxy (Basic Auth Only)
88
+ * proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
89
+
90
+ ```sh
91
+ bs_local_args = { "key": "<browserstack-accesskey>", "proxyHost": "127.0.0.1", "proxyPort": "8000", "proxyUser": "user", "proxyPass": "password"}
92
+ ```
93
+
94
+ #### Local Proxy
95
+ To use local proxy in local testing -
96
+
97
+ * localProxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
98
+ * localProxyPort: Port for the proxy, defaults to 8081 when -localProxyHost is used
99
+ * localProxyUser: Username for connecting to proxy (Basic Auth Only)
100
+ * localProxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
101
+
102
+ ```
103
+ bs_local_args = { "key": "<browserstack-accesskey>", "localProxyHost": "127.0.0.1", "localProxyPort": "8000", "-localProxyUser": "user", "-localProxyPass": "password"}
104
+ ```
105
+
106
+ #### PAC (Proxy Auto-Configuration)
107
+ To use PAC (Proxy Auto-Configuration) in local testing -
108
+
109
+ * pac-file: PAC (Proxy Auto-Configuration) file’s absolute path
110
+
111
+ ```
112
+ bs_local_args = { "key": "<browserstack-accesskey>" , "-pac-file": "<pac_file_abs_path>"}
113
+ ```
114
+
115
+ #### Local Identifier
116
+ If doing simultaneous multiple local testing connections, set this uniquely for different processes -
117
+ ```sh
118
+ bs_local_args = { "key": "<browserstack-accesskey>" , "localIdentifier": "randomstring"}
119
+ ```
120
+
121
+ ## Additional Arguments
122
+
123
+ #### Binary Path
124
+
125
+ By default, BrowserStack local wrappers try downloading and executing the latest version of BrowserStack binary in ~/.browserstack or the present working directory or the tmp folder by order. But you can override these by passing the -binarypath argument.
126
+ Path to specify local Binary path -
127
+ ```sh
128
+ bs_local_args = { "key": "<browserstack-accesskey>" , "binarypath": "/browserstack/BrowserStackLocal"}
129
+ ```
130
+
131
+ #### Logfile
132
+ To save the logs to the file while running with the '-v' argument, you can specify the path of the file. By default the logs are saved in the local.log file in the present woring directory.
133
+ To specify the path to file where the logs will be saved -
134
+ ```sh
135
+ bs_local_args = { "key": "<browserstack-accesskey>" , "v": "true", "logfile": "/browserstack/logs.txt"}
136
+ ```
137
+
138
+ ## Contribute
139
+
140
+ To run the test suite run, `python -m unittest discover`.
141
+
142
+ ### Reporting bugs
143
+
144
+ You can submit bug reports either in the Github issue tracker.
145
+
146
+ Before submitting an issue please check if there is already an existing issue. If there is, please add any additional information give it a "+1" in the comments.
147
+
148
+ When submitting an issue please describe the issue clearly, including how to reproduce the bug, which situations it appears in, what you expect to happen, what actually happens, and what platform (operating system and version) you are using.
149
+
150
+ ### Pull Requests
151
+
152
+ We love pull requests! We are very happy to work with you to get your changes merged in, however, please keep the following in mind.
153
+
154
+ * Adhere to the coding conventions you see in the surrounding code.
155
+ * Include tests, and make sure all tests pass.
156
+ * Before submitting a pull-request, clean up the git history by going over your commits and squashing together minor changes and fixes into the corresponding commits. You can do this using the interactive rebase command.
@@ -33,7 +33,7 @@ class LocalBinary:
33
33
  self.path_index = 0
34
34
 
35
35
  def is_alpine(self):
36
- grepOutput = subprocess.run("gfrep -w NAME /etc/os-release", capture_output=True, shell=True)
36
+ grepOutput = subprocess.run("grep -w NAME /etc/os-release", capture_output=True, shell=True)
37
37
  if grepOutput.stdout.decode('utf-8').find('Alpine') > -1:
38
38
  return True
39
39
  return False
@@ -102,7 +102,8 @@ class LocalBinary:
102
102
  dest_parent_dir = os.path.join(os.path.expanduser('~'), '.browserstack')
103
103
  if not os.path.exists(dest_parent_dir):
104
104
  os.makedirs(dest_parent_dir)
105
- bsfiles = [f for f in os.listdir(dest_parent_dir) if f.startswith('BrowserStackLocal')]
105
+ binary_name = 'BrowserStackLocal.exe' if self.is_windows else 'BrowserStackLocal'
106
+ bsfiles = [f for f in os.listdir(dest_parent_dir) if f == binary_name]
106
107
 
107
108
  if len(bsfiles) == 0:
108
109
  binary_path = self.download()
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.1
2
+ Name: browserstack-local
3
+ Version: 1.2.8
4
+ Summary: Python bindings for Browserstack Local
5
+ Home-page: https://github.com/browserstack/browserstack-local-python
6
+ Download-URL: https://github.com/browserstack/browserstack-local-python/archive/master.zip
7
+ Author: BrowserStack
8
+ Author-email: support@browserstack.com
9
+ Keywords: BrowserStack,Local,selenium,testing
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ Requires-Dist: psutil
13
+
14
+ # browserstack-local-python
15
+
16
+ [![Build Status](https://travis-ci.org/browserstack/browserstack-local-python.svg?branch=master)](https://travis-ci.org/browserstack/browserstack-local-python)
17
+
18
+ Python bindings for BrowserStack Local.
19
+
20
+ ## Installation
21
+
22
+ ```sh
23
+ pip install browserstack-local
24
+ ```
25
+
26
+ ## Example
27
+
28
+ ```python
29
+ from browserstack.local import Local
30
+
31
+ #creates an instance of Local
32
+ bs_local = Local()
33
+
34
+ #replace <browserstack-accesskey> with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY".
35
+ bs_local_args = { "key": "<browserstack-accesskey>" }
36
+
37
+ #starts the Local instance with the required arguments
38
+ bs_local.start(**bs_local_args)
39
+
40
+ #check if BrowserStack local instance is running
41
+ print(bs_local.isRunning())
42
+
43
+ #stop the Local instance
44
+ bs_local.stop()
45
+
46
+ ```
47
+
48
+ ## Arguments
49
+
50
+ Apart from the key, all other BrowserStack Local modifiers are optional. For the full list of modifiers, refer [BrowserStack Local modifiers](https://www.browserstack.com/local-testing#modifiers). For examples, refer below -
51
+
52
+ #### Verbose Logging
53
+ To enable verbose logging -
54
+ ```sh
55
+ bs_local_args = { "key": "<browserstack-accesskey>" , "v": "true"}
56
+ ```
57
+
58
+ #### Folder Testing
59
+ To test local folder rather internal server, provide path to folder as value of this option -
60
+ ```sh
61
+ bs_local_args = { "key": "<browserstack-accesskey>" , "f": "/my/awesome/folder"}
62
+ ```
63
+
64
+ #### Force Start
65
+ To kill other running Browserstack Local instances -
66
+ ```sh
67
+ bs_local_args = { "key": "<browserstack-accesskey>" , "force": "true"}
68
+ ```
69
+
70
+ #### Only Automate
71
+ To disable local testing for Live and Screenshots, and enable only Automate -
72
+ ```sh
73
+ bs_local_args = { "key": "<browserstack-accesskey>" , "onlyAutomate": "true"}
74
+ ```
75
+
76
+ #### Force Local
77
+ To route all traffic via local(your) machine -
78
+ ```sh
79
+ bs_local_args = { "key": "<browserstack-accesskey>" , "forcelocal": "true"}
80
+ ```
81
+
82
+ #### Proxy
83
+ To use a proxy for local testing -
84
+
85
+ * proxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
86
+ * proxyPort: Port for the proxy, defaults to 3128 when -proxyHost is used
87
+ * proxyUser: Username for connecting to proxy (Basic Auth Only)
88
+ * proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
89
+
90
+ ```sh
91
+ bs_local_args = { "key": "<browserstack-accesskey>", "proxyHost": "127.0.0.1", "proxyPort": "8000", "proxyUser": "user", "proxyPass": "password"}
92
+ ```
93
+
94
+ #### Local Proxy
95
+ To use local proxy in local testing -
96
+
97
+ * localProxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
98
+ * localProxyPort: Port for the proxy, defaults to 8081 when -localProxyHost is used
99
+ * localProxyUser: Username for connecting to proxy (Basic Auth Only)
100
+ * localProxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
101
+
102
+ ```
103
+ bs_local_args = { "key": "<browserstack-accesskey>", "localProxyHost": "127.0.0.1", "localProxyPort": "8000", "-localProxyUser": "user", "-localProxyPass": "password"}
104
+ ```
105
+
106
+ #### PAC (Proxy Auto-Configuration)
107
+ To use PAC (Proxy Auto-Configuration) in local testing -
108
+
109
+ * pac-file: PAC (Proxy Auto-Configuration) file’s absolute path
110
+
111
+ ```
112
+ bs_local_args = { "key": "<browserstack-accesskey>" , "-pac-file": "<pac_file_abs_path>"}
113
+ ```
114
+
115
+ #### Local Identifier
116
+ If doing simultaneous multiple local testing connections, set this uniquely for different processes -
117
+ ```sh
118
+ bs_local_args = { "key": "<browserstack-accesskey>" , "localIdentifier": "randomstring"}
119
+ ```
120
+
121
+ ## Additional Arguments
122
+
123
+ #### Binary Path
124
+
125
+ By default, BrowserStack local wrappers try downloading and executing the latest version of BrowserStack binary in ~/.browserstack or the present working directory or the tmp folder by order. But you can override these by passing the -binarypath argument.
126
+ Path to specify local Binary path -
127
+ ```sh
128
+ bs_local_args = { "key": "<browserstack-accesskey>" , "binarypath": "/browserstack/BrowserStackLocal"}
129
+ ```
130
+
131
+ #### Logfile
132
+ To save the logs to the file while running with the '-v' argument, you can specify the path of the file. By default the logs are saved in the local.log file in the present woring directory.
133
+ To specify the path to file where the logs will be saved -
134
+ ```sh
135
+ bs_local_args = { "key": "<browserstack-accesskey>" , "v": "true", "logfile": "/browserstack/logs.txt"}
136
+ ```
137
+
138
+ ## Contribute
139
+
140
+ To run the test suite run, `python -m unittest discover`.
141
+
142
+ ### Reporting bugs
143
+
144
+ You can submit bug reports either in the Github issue tracker.
145
+
146
+ Before submitting an issue please check if there is already an existing issue. If there is, please add any additional information give it a "+1" in the comments.
147
+
148
+ When submitting an issue please describe the issue clearly, including how to reproduce the bug, which situations it appears in, what you expect to happen, what actually happens, and what platform (operating system and version) you are using.
149
+
150
+ ### Pull Requests
151
+
152
+ We love pull requests! We are very happy to work with you to get your changes merged in, however, please keep the following in mind.
153
+
154
+ * Adhere to the coding conventions you see in the surrounding code.
155
+ * Include tests, and make sure all tests pass.
156
+ * Before submitting a pull-request, clean up the git history by going over your commits and squashing together minor changes and fixes into the corresponding commits. You can do this using the interactive rebase command.
@@ -5,8 +5,10 @@ except ImportError:
5
5
  setup(
6
6
  name = 'browserstack-local',
7
7
  packages = ['browserstack'],
8
- version = '1.2.6',
8
+ version = '1.2.8',
9
9
  description = 'Python bindings for Browserstack Local',
10
+ long_description=open('README.md').read(),
11
+ long_description_content_type='text/markdown',
10
12
  author = 'BrowserStack',
11
13
  author_email = 'support@browserstack.com',
12
14
  url = 'https://github.com/browserstack/browserstack-local-python',
@@ -1,12 +0,0 @@
1
- Metadata-Version: 1.1
2
- Name: browserstack-local
3
- Version: 1.2.6
4
- Summary: Python bindings for Browserstack Local
5
- Home-page: https://github.com/browserstack/browserstack-local-python
6
- Author: BrowserStack
7
- Author-email: support@browserstack.com
8
- License: UNKNOWN
9
- Download-URL: https://github.com/browserstack/browserstack-local-python/archive/master.zip
10
- Description: UNKNOWN
11
- Keywords: BrowserStack,Local,selenium,testing
12
- Platform: UNKNOWN
@@ -1,12 +0,0 @@
1
- Metadata-Version: 1.1
2
- Name: browserstack-local
3
- Version: 1.2.6
4
- Summary: Python bindings for Browserstack Local
5
- Home-page: https://github.com/browserstack/browserstack-local-python
6
- Author: BrowserStack
7
- Author-email: support@browserstack.com
8
- License: UNKNOWN
9
- Download-URL: https://github.com/browserstack/browserstack-local-python/archive/master.zip
10
- Description: UNKNOWN
11
- Keywords: BrowserStack,Local,selenium,testing
12
- Platform: UNKNOWN