How to use Scroll method of FlaUI.UIA3.Patterns.ScrollPattern class

Best FlaUI code snippet using FlaUI.UIA3.Patterns.ScrollPattern.Scroll

ScrollPattern.cs

Source:ScrollPattern.cs Github

copy

Full Screen

...7using UIA = Interop.UIAutomationClient;89namespace FlaUI.UIA3.Patterns10{11 public class ScrollPattern : ScrollPatternBase<UIA.IUIAutomationScrollPattern>12 {13 public static readonly PatternId Pattern = PatternId.Register(AutomationType.UIA3, UIA.UIA_PatternIds.UIA_ScrollPatternId, "Scroll", AutomationObjectIds.IsScrollPatternAvailableProperty);14 public static readonly PropertyId HorizontallyScrollableProperty = PropertyId.Register(AutomationType.UIA3, UIA.UIA_PropertyIds.UIA_ScrollHorizontallyScrollablePropertyId, "HorizontallyScrollable");15 public static readonly PropertyId HorizontalScrollPercentProperty = PropertyId.Register(AutomationType.UIA3, UIA.UIA_PropertyIds.UIA_ScrollHorizontalScrollPercentPropertyId, "HorizontalScrollPercent");16 public static readonly PropertyId HorizontalViewSizeProperty = PropertyId.Register(AutomationType.UIA3, UIA.UIA_PropertyIds.UIA_ScrollHorizontalViewSizePropertyId, "HorizontalViewSize");17 public static readonly PropertyId VerticallyScrollableProperty = PropertyId.Register(AutomationType.UIA3, UIA.UIA_PropertyIds.UIA_ScrollVerticallyScrollablePropertyId, "VerticallyScrollable");18 public static readonly PropertyId VerticalScrollPercentProperty = PropertyId.Register(AutomationType.UIA3, UIA.UIA_PropertyIds.UIA_ScrollVerticalScrollPercentPropertyId, "VerticalScrollPercent");19 public static readonly PropertyId VerticalViewSizeProperty = PropertyId.Register(AutomationType.UIA3, UIA.UIA_PropertyIds.UIA_ScrollVerticalViewSizePropertyId, "VerticalViewSize");2021 public ScrollPattern(FrameworkAutomationElementBase frameworkAutomationElement, UIA.IUIAutomationScrollPattern nativePattern) : base(frameworkAutomationElement, nativePattern)22 {23 }2425 public override void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount)26 {27 Com.Call(() => NativePattern.Scroll((UIA.ScrollAmount)horizontalAmount, (UIA.ScrollAmount)verticalAmount));28 }2930 public override void SetScrollPercent(double horizontalPercent, double verticalPercent)31 {32 Com.Call(() => NativePattern.SetScrollPercent(horizontalPercent, verticalPercent));33 }34 }3536 public class ScrollPatternPropertyIds : IScrollPatternPropertyIds37 {38 public PropertyId HorizontallyScrollable => ScrollPattern.HorizontallyScrollableProperty;3940 public PropertyId HorizontalScrollPercent => ScrollPattern.HorizontalScrollPercentProperty;4142 public PropertyId HorizontalViewSize => ScrollPattern.HorizontalViewSizeProperty;4344 public PropertyId VerticallyScrollable => ScrollPattern.VerticallyScrollableProperty;4546 public PropertyId VerticalScrollPercent => ScrollPattern.VerticalScrollPercentProperty;4748 public PropertyId VerticalViewSize => ScrollPattern.VerticalViewSizeProperty;49 }50} ...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run FlaUI automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in ScrollPattern

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful