File: open_test_page.py

package info (click to toggle)
python-bleach 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,348 kB
  • sloc: python: 14,628; sh: 60; makefile: 51
file content (39 lines) | stat: -rwxr-xr-x 763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python

import webbrowser


TEST_BROWSERS = {
    # 'mozilla',
    "firefox",
    # 'netscape',
    # 'galeon',
    # 'epiphany',
    # 'skipstone',
    # 'kfmclient',
    # 'konqueror',
    # 'kfm',
    # 'mosaic',
    # 'opera',
    # 'grail',
    # 'links',
    # 'elinks',
    # 'lynx',
    # 'w3m',
    "windows-default",
    # 'macosx',
    "safari",
    # 'google-chrome',
    "chrome",
    # 'chromium',
    # 'chromium-browser',
}


if __name__ == "__main__":
    for browser_name in TEST_BROWSERS:
        try:
            browser = webbrowser.get(browser_name)
            browser.open_new_tab("http://localhost:8080")
        except Exception as error:
            print("error getting test browser {}: {}".format(browser_name, error))