-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from ERNI-Academy/feature/selenium-manager
Add support for Selenium Manager
- Loading branch information
Showing
17 changed files
with
90 additions
and
138 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
4 changes: 2 additions & 2 deletions
4
...Selenium.Web/POM/Stinto/Chat/IChatPage.cs → ...Selenium.Web/POM/Chatzy/Chat/IChatPage.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
using TestWare.Core.Interfaces; | ||
|
||
namespace TestWare.Samples.Selenium.Web.POM.Stinto.Chat; | ||
namespace TestWare.Samples.Selenium.Web.POM.Chat; | ||
|
||
public interface IChatPage : ITestWareComponent | ||
{ | ||
void CheckMessage(string userId, string message); | ||
void CheckChatMessage(string userId, string message); | ||
void SendMessage(string message); | ||
} |
46 changes: 46 additions & 0 deletions
46
samples/TestWare.Samples.Selenium.Web/POM/Chatzy/CreateChat/CreateChatPage.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,46 @@ | ||
using OpenQA.Selenium; | ||
using TestWare.Core.Libraries; | ||
using TestWare.Engines.Common.Extras; | ||
using TestWare.Engines.Selenium.Factory; | ||
using TestWare.Engines.Selenium.Pages; | ||
|
||
namespace TestWare.Samples.Selenium.Web.POM.CreateChat; | ||
|
||
public class CreateChatPage : WebPage, ICreateChatPage | ||
{ | ||
[FindsBy(How = How.Id, Using = "X8712")] | ||
private IWebElement UserIdInput { get; set; } | ||
|
||
[FindsBy(How = How.Id, Using = "X7728")] | ||
private IWebElement ChatRoomTitleInput { get; set; } | ||
|
||
[FindsBy(How = How.XPath, Using = "//*[@type='submit']")] | ||
private IWebElement SubmitButton { get; set; } | ||
|
||
public CreateChatPage(IBrowserDriver driver) : base(driver) | ||
{ | ||
} | ||
|
||
public void SetUserId(string userId) | ||
=> SendKeysElement(this.UserIdInput, userId); | ||
|
||
public void SetChatRoomTitle(string chatRoomTitle) | ||
=> SendKeysElement(this.ChatRoomTitleInput, chatRoomTitle); | ||
|
||
public void ClickSubmitButton() | ||
{ | ||
var initialUrl = GetChatUrl(); | ||
ClickElement(this.SubmitButton); | ||
RetryPolicies.ExecuteActionWithRetries(() => | ||
{ | ||
this.Driver.Url.Should().NotBe(initialUrl); | ||
}); | ||
} | ||
|
||
public string GetChatUrl() | ||
=> this.Driver.Url; | ||
|
||
public void NavigateTo(string url) | ||
=> NavigateToUrl(url); | ||
} | ||
|
5 changes: 3 additions & 2 deletions
5
.../POM/Stinto/CreateChat/ICreateChatPage.cs → .../POM/Chatzy/CreateChat/ICreateChatPage.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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
using TestWare.Core.Interfaces; | ||
|
||
namespace TestWare.Samples.Selenium.Web.POM.Stinto.CreateChat; | ||
namespace TestWare.Samples.Selenium.Web.POM.CreateChat; | ||
|
||
public interface ICreateChatPage : ITestWareComponent | ||
{ | ||
void SetUserId(string userId); | ||
void AcceptTermsOfUse(); | ||
void SetChatRoomTitle(string chatRoomTitle); | ||
void ClickSubmitButton(); | ||
string GetChatUrl(); | ||
void NavigateTo(string url); | ||
} |
35 changes: 0 additions & 35 deletions
35
samples/TestWare.Samples.Selenium.Web/POM/Stinto/CreateChat/CreateChatPage.cs
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
samples/TestWare.Samples.Selenium.Web/POM/Stinto/Home/HomePage.cs
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
samples/TestWare.Samples.Selenium.Web/POM/Stinto/Home/IHomePage.cs
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.