Exemplo n.º 1
0
        public IEnumerable <string> GetVenueItemLabels()
        {
            if (PlatformName.Equals(MobilePlatform.IOS))
            {
                return(VenueItems.Select(item => item.GetAttribute("label")));
            }

            return(VenueItems.Select(item => item.Text));
        }
Exemplo n.º 2
0
        public string GetSelectedVenue()
        {
            if (PlatformName.Equals(MobilePlatform.IOS))
            {
                return(VenuePicker.FindElement(MobileBy.AccessibilityId("VenueInformation")).GetAttribute("value"));
            }

            return(VenuePicker.FindElement(By.Id("android:id/text1")).Text);
        }
Exemplo n.º 3
0
        public string GetResult()
        {
            if (PlatformName.Equals(MobilePlatform.IOS))
            {
                return(new Wait(Driver).WaitUntilElementContainsValue(Result, TimeSpan.FromSeconds(10)));
            }

            return(new Wait(Driver).WaitUntilElementContainsText(Result, TimeSpan.FromSeconds(10)));
        }
Exemplo n.º 4
0
        public void SelectVenue(string venue)
        {
            if (PlatformName.Equals(MobilePlatform.IOS))
            {
                // Select venue option
                VenueItems.First(item => item.GetAttribute("label").Equals(venue)).Click();
                // Navigate back
                Driver.Navigate().Back();
                return;
            }

            VenueItems.First(item => item.Text.Equals(venue)).Click();
        }
Exemplo n.º 5
0
        public void SelectServiceLevel(string serviceLevel)
        {
            if (PlatformName.Equals(MobilePlatform.IOS))
            {
                // Select venue option
                ServiceLevelItems.First(item => item.GetAttribute("label").Equals(serviceLevel)).Click();
                // Navigate back
                Driver.Navigate().Back();
                return;
            }

            ServiceLevelItems.First(item => item.Text.Equals(serviceLevel)).Click();
        }
Exemplo n.º 6
0
        private static void ConvertPlatformArrayToList(Array PlatformNameList, ref List <UnrealTargetPlatform> Platforms, string ModuleFilename)
        {
            // look up each platform name in the array
            foreach (string PlatformName in PlatformNameList)
            {
                // case-insensitive enum matching
                bool bFoundValidType = false;
                foreach (UnrealTargetPlatform PossiblePlatform in Enum.GetValues(typeof(UnrealTargetPlatform)))
                {
                    if (PlatformName.Equals(PossiblePlatform.ToString(), StringComparison.InvariantCultureIgnoreCase))
                    {
                        bFoundValidType = true;
                        // add it to the output!
                        Platforms.Add(PossiblePlatform);
                        break;
                    }
                }

                if (!bFoundValidType)
                {
                    throw new BuildException("Module entry specified unknown platform '{0}' in plugin descriptor file '{1}'", PlatformName, ModuleFilename);
                }
            }
        }
Exemplo n.º 7
0
 public void EnterNumberOfGuests(string text)
 {
     NumberOfGuests.SendKeys(text + (PlatformName.Equals(MobilePlatform.IOS) ? Keys.Enter : string.Empty));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Return true if the given platform is the PNaCl platform.
 /// </summary>
 public bool IsPNaCl()
 {
     return(PlatformName.Equals(Strings.PNaClPlatformName, StringComparison.OrdinalIgnoreCase));
 }