-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #126 fixed scrolling tests * #126 fixed scrollToTheCenter test * #126 resolve parameters in executeScript method * #126 added remarks to ScrollBy
- Loading branch information
Showing
9 changed files
with
113 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...m/tests/Aquality.Selenium.Tests/Integration/TestApp/TheDemoSite/Forms/HomeDemoSiteForm.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Aquality.Selenium.Elements.Interfaces; | ||
using OpenQA.Selenium; | ||
|
||
namespace Aquality.Selenium.Tests.Integration.TestApp.TheInternet.Forms | ||
{ | ||
internal class HomeDemoSiteForm : TheDemoSiteForm | ||
{ | ||
public HomeDemoSiteForm() : base(By.XPath("//strong[contains(.,'1. Home ')]"), "Home") | ||
{ | ||
} | ||
|
||
public ILabel FirstScrollableExample => ElementFactory.GetLabel( | ||
By.XPath("//div[@align='center']//tr[.//strong[contains(.,'index.php')]]//div[@align='left']"), "First example"); | ||
|
||
protected override string UrlPart => string.Empty; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...um/tests/Aquality.Selenium.Tests/Integration/TestApp/TheDemoSite/Forms/TheDemoSiteForm.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Aquality.Selenium.Browsers; | ||
using Aquality.Selenium.Forms; | ||
using OpenQA.Selenium; | ||
|
||
namespace Aquality.Selenium.Tests.Integration.TestApp.TheInternet.Forms | ||
{ | ||
internal abstract class TheDemoSiteForm : Form | ||
{ | ||
private const string BaseUrl = "http://thedemosite.co.uk/"; | ||
|
||
protected TheDemoSiteForm(By locator, string name) : base(locator, name) | ||
{ | ||
} | ||
|
||
protected abstract string UrlPart { get; } | ||
|
||
public string Url => BaseUrl + UrlPart; | ||
|
||
public void Open() | ||
{ | ||
BrowserManager.Browser.GoTo(Url); | ||
BrowserManager.Browser.WaitForPageToLoad(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/GetElementYCoordinate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return arguments[0].getBoundingClientRect().top; |
1 change: 1 addition & 0 deletions
1
Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/GetScrollCoordinates.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return [arguments[0].scrollLeft, arguments[0].scrollTop]; |
1 change: 1 addition & 0 deletions
1
Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/GetWindowSize.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return Math.max(document.documentElement.clientHeight, window.innerHeight || 0); |