|
| 1 | +// <copyright file="FirefoxAndroidOptions.cs" company="WebDriver Committers"> |
| 2 | +// Licensed to the Software Freedom Conservancy (SFC) under one |
| 3 | +// or more contributor license agreements. See the NOTICE file |
| 4 | +// distributed with this work for additional information |
| 5 | +// regarding copyright ownership. The SFC licenses this file |
| 6 | +// to you under the Apache License, Version 2.0 (the "License"); |
| 7 | +// you may not use this file except in compliance with the License. |
| 8 | +// You may obtain a copy of the License at |
| 9 | +// |
| 10 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +// |
| 12 | +// Unless required by applicable law or agreed to in writing, software |
| 13 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +// See the License for the specific language governing permissions and |
| 16 | +// limitations under the License. |
| 17 | +// </copyright> |
| 18 | + |
| 19 | +using System.Collections.Generic; |
| 20 | +using System.Collections.ObjectModel; |
| 21 | +using OpenQA.Selenium.Internal; |
| 22 | + |
| 23 | +namespace OpenQA.Selenium.Firefox |
| 24 | +{ |
| 25 | + /// <summary> |
| 26 | + /// Generates the capabilities for automating Firefox applications on Android |
| 27 | + /// </summary> |
| 28 | + public class FirefoxAndroidOptions : AndroidOptions |
| 29 | + { |
| 30 | + private string androidPackage; |
| 31 | + private string androidDeviceSerial; |
| 32 | + private string androidActivity; |
| 33 | + private List<string> androidIntentArguments = new List<string>(); |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Initializes a new instance of the <see cref="FirefoxAndroidOptions"/> class. |
| 37 | + /// </summary> |
| 38 | + /// <param name="androidPackage"></param> |
| 39 | + public FirefoxAndroidOptions(string androidPackage) : base(androidPackage) |
| 40 | + { |
| 41 | + } |
| 42 | + |
| 43 | + /// <summary> |
| 44 | + /// Gets a read-only list of the intent arguments set for this set of options. |
| 45 | + /// </summary> |
| 46 | + public ReadOnlyCollection<string> AndroidIntentArguments |
| 47 | + { |
| 48 | + get { return this.androidIntentArguments.AsReadOnly(); } |
| 49 | + } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Argument to launch the intent with. The given intent arguments are appended to the "am start" command. |
| 53 | + /// </summary> |
| 54 | + /// <param name="arguments">The argument to add.</param> |
| 55 | + public void AddIntentArgument(string argument) |
| 56 | + { |
| 57 | + this.AddIntentArguments(argument); |
| 58 | + } |
| 59 | + |
| 60 | + /// <summary> |
| 61 | + /// Arguments to launch the intent with. The given intent arguments are appended to the "am start" command. |
| 62 | + /// </summary> |
| 63 | + /// <param name="arguments">The arguments to add.</param> |
| 64 | + public void AddIntentArguments(params string[] arguments) |
| 65 | + { |
| 66 | + this.androidIntentArguments.AddRange(arguments); |
| 67 | + } |
| 68 | + } |
| 69 | +} |
0 commit comments