コード例 #1
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/automateit
        public T CssValue <T>(IWebElement element, ECssProperty property)
        {
            var value = element.GetCssValue(property.StringValue());

            return(this.Cast <T>(value));
        }
コード例 #2
0
 public void SetCssValue(By by, By frameBy, ECssProperty cssProperty, int value) => Excecute($"arguments[0].style.{cssProperty}={value};", Browser.Find.Element(by, frameBy));
コード例 #3
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/automateit
 /// <summary>
 ///     Получить css параметр тега
 /// </summary>
 public T CssValue <T>(string scssSelector, ECssProperty property)
 {
     return(this.CssValue <T>(ScssBuilder.CreateBy(scssSelector), property));
 }
コード例 #4
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/automateit
 public T CssValue <T>(By by, ECssProperty property)
 {
     return(this.RepeatAfterStale(() => this.CssValue <T>(this.Browser.Find.Element(by), property)));
 }
コード例 #5
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
        public T ComputedCssValue <T>(IWebElement element, ECssProperty property)
        {
            var value = Browser.Js.GetComputedStyle(element, property.StringValue());

            return(Cast <T>(value));
        }
コード例 #6
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
 public List <T> ComputedCssValues <T>(string scss, ECssProperty property) => RepeatAfterStale(
     () =>
 {
     var webElements = Browser.Find.Elements(scss);
     return(webElements.Select(e => ComputedCssValue <T>(e, property)).ToList());
 });
コード例 #7
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
 public T ComputedCssValue <T>(By by, By frameBy, ECssProperty property) => RepeatAfterStale(() => ComputedCssValue <T>(Browser.Find.Element(by, frameBy), property));
コード例 #8
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
 /// <summary>
 /// Get computed value(using window.getComputedStyle()) of specified CSS property
 /// </summary>
 public T ComputedCssValue <T>(string scss, ECssProperty property) => RepeatAfterStale(() => ComputedCssValue <T>(Browser.Find.Element(ScssBuilder.CreateBy(scss)), property));
コード例 #9
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
 public T CssValue <T>(By by, ECssProperty property) => RepeatAfterStale(() => CssValue <T>(Browser.Find.Element(by), property));
コード例 #10
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
 public T CssValue <T>(Selector selector, ECssProperty property) => RepeatAfterStale(() => CssValue <T>(Browser.Find.Element(selector.By, selector.FrameBy), property));
コード例 #11
0
ファイル: BrowserGet.cs プロジェクト: wsbaser/LinnworksTest
 /// <summary>
 ///     Get the css tag parameter
 /// </summary>
 public T CssValue <T>(string scssSelector, ECssProperty property) => CssValue <T>(ScssBuilder.CreateBy(scssSelector), property);