-
Notifications
You must be signed in to change notification settings - Fork 784
Expand file tree
/
Copy pathmultiple_browsers_options.robot
More file actions
74 lines (63 loc) · 4.41 KB
/
multiple_browsers_options.robot
File metadata and controls
74 lines (63 loc) · 4.41 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
*** Settings ***
Suite Teardown Close All Browsers
Library ../resources/testlibs/get_selenium_options.py
Resource resource.robot
Force Tags Known Issue Firefox Known Issue Safari Known Issue Internet Explorer
Documentation Creating test which would work on all browser is not possible.
... These tests are for Chrome only.
*** Test Cases ***
Chrome Browser With Selenium Options As String
[Tags] SKIP_ON_WINDOWS
[Documentation]
... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].*
... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].*
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("--disable-dev-shm-usage")
Chrome Browser With Selenium Options As String With Attribute As True
[Tags] SKIP_ON_WINDOWS
[Documentation]
... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].*
... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].*
... LOG 1:13 DEBUG REGEXP: .*['\\\"]--headless=new['\\\"].*
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_argument ( "--headless=new" )
Chrome Browser With Selenium Options With Complex Object
[Tags] NoGrid SKIP_ON_WINDOWS
[Documentation]
... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].*
... LOG 1:13 DEBUG REGEXP: .*['\\\"]mobileEmulation['\\\"]: {['\\\"]deviceName['\\\"]: ['\\\"]Galaxy S5['\\\"].*
... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].*
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_experimental_option( "mobileEmulation" , { 'deviceName' : 'Galaxy S5'})
Chrome Browser With Selenium Options Object
[Tags] SKIP_ON_WINDOWS
[Documentation]
... LOG 2:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].*
... LOG 2:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].*
${options} = Get Chrome Options
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=${options}
Chrome Browser With Selenium Options Invalid Method
Run Keyword And Expect Error AttributeError: 'Options' object has no attribute 'not_here_method'
... Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=not_here_method("arg1")
Chrome Browser With Selenium Options Argument With Semicolon
[Tags] SKIP_ON_WINDOWS
[Documentation]
... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].*
... LOG 1:13 DEBUG REGEXP: .*\\\[['\\\"]has;semicolon['\\\"].*
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("has;semicolon")
Chrome Browser with Selenium Options Ending With Semicolon
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("--disable-dev-shm-usage") ;
Chrome Browser with Selenium Options Ending With A Few Semicolons
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("--disable-dev-shm-usage") ; ; ;
Chrome Browser with Selenium Options Containing Empty Option
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; ; add_argument ( "--headless=new" )
Chrome Browser with Selenium Options With A Missing Semicolon
Run Keyword And Expect Error ValueError: Unable to parse option: "add_argument ( "--disable-dev-shm-usage" ) add_argument ( "--headless=new" )"
... Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) add_argument ( "--headless=new" )