"Fossies" - the Fresh Open Source Software Archive

Member "selenium-selenium-4.8.1/dotnet/src/webdriver/Internal/AndroidOptions.cs" (17 Feb 2023, 2518 Bytes) of package /linux/www/selenium-selenium-4.8.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "AndroidOptions.cs" see the Fossies "Dox" file reference documentation.

    1 // <copyright file="AndroidOptions.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;
   20 
   21 namespace OpenQA.Selenium.Internal
   22 {
   23     /// <summary>
   24     /// Provides a base class for options for browsers to be automated on Android.
   25     /// </summary>
   26     public class AndroidOptions
   27     {
   28         private string androidPackage;
   29         private string androidDeviceSerial;
   30         private string androidActivity;
   31 
   32         /// <summary>
   33         /// Initializes a new instance of the <see cref="AndroidOptions"/> class.
   34         /// </summary>
   35         /// <param name="androidPackage"></param>
   36         protected AndroidOptions(string androidPackage)
   37         {
   38             if (string.IsNullOrEmpty(androidPackage))
   39             {
   40                 throw new ArgumentException("The Android package cannot be null or the empty string", nameof(androidPackage));
   41             }
   42 
   43             this.androidPackage = androidPackage;
   44         }
   45 
   46         /// <summary>
   47         /// The package name of the application to automate.
   48         /// </summary>
   49         public string AndroidPackage
   50         {
   51             get { return this.androidPackage; }
   52         }
   53 
   54         /// <summary>
   55         /// The serial number of the device on which to launch the application.
   56         /// </summary>
   57         public string AndroidDeviceSerial
   58         {
   59             get { return this.androidDeviceSerial; }
   60             set { this.androidDeviceSerial = value; }
   61         }
   62 
   63         /// <summary>
   64         /// Gets or sets the name of the Activity hosting the app.
   65         /// </summary>
   66         public string AndroidActivity
   67         {
   68             get { return this.androidActivity; }
   69             set { this.androidActivity = value; }
   70         }
   71     }
   72 }