Merge pull request #475 from Qtoss-AI/master · SciSharp/BotSharp@1578ba0 · GitHub
Skip to content

Commit 1578ba0

Browse files
authored
Merge pull request #475 from Qtoss-AI/master
WebDriver improvement
2 parents 1f14299 + e9ae471 commit 1578ba0

30 files changed

Lines changed: 277 additions & 47 deletions

‎src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs‎

Lines changed: 2 additions & 2 deletions

‎src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ public class BrowserActionResult
88
public string Selector { get; set; }
99
public string Body { get; set; }
1010
public bool IsHighlighted { get; set; }
11+
12+
public override string ToString()
13+
{
14+
return $"{IsSuccess} - {Selector}";
15+
}
1116
}

‎src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public class ElementActionArgs
1010

1111
public ElementPosition? Position { get; set; }
1212

13+
public string? PressKey { get; set; }
14+
1315
/// <summary>
1416
/// Required for deserialization
1517
/// </summary>

‎src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementLocatingArgs.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ public class ElementLocatingArgs
55
[JsonPropertyName("match_rule")]
66
public string MatchRule { get; set; } = string.Empty;
77

8+
[JsonPropertyName("tag")]
9+
public string? Tag { get; set; } = null!;
10+
811
[JsonPropertyName("text")]
912
public string? Text { get; set; }
1013

@@ -20,6 +23,8 @@ public class ElementLocatingArgs
2023
[JsonPropertyName("selector")]
2124
public string? Selector { get; set; }
2225

26+
public bool Parent { get; set; }
27+
2328
public bool FailIfMultiple { get; set; }
2429

2530
/// <summary>

‎src/Infrastructure/BotSharp.Abstraction/Browsing/Models/HttpRequestParams.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class HttpRequestParams
1818

1919
public HttpRequestParams(string url, HttpMethod method, string? payload = null)
2020
{
21-
Method = HttpMethod.Get;
21+
Method = method;
2222
Url = url;
2323
Payload = payload;
2424
}

‎src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ public interface IBotSharpRepository
1717
#endregion
1818

1919
#region User
20-
User? GetUserByEmail(string email);
21-
User? GetUserById(string id);
22-
User? GetUserByUserName(string userName);
23-
void CreateUser(User user);
20+
User? GetUserByEmail(string email) => throw new NotImplementedException();
21+
User? GetUserById(string id) => throw new NotImplementedException();
22+
User? GetUserByUserName(string userName) => throw new NotImplementedException();
23+
void CreateUser(User user) => throw new NotImplementedException();
24+
void UpdateUserVerified(string userId) => throw new NotImplementedException();
2425
#endregion
2526

2627
#region Agent

‎src/Infrastructure/BotSharp.Abstraction/Users/IAuthenticationHook.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ public interface IAuthenticationHook
88
Task<User> Authenticate(string id, string password);
99
void AddClaims(List<Claim> claims);
1010
void BeforeSending(Token token);
11+
Task UserCreated(User user);
1112
}

‎src/Infrastructure/BotSharp.Abstraction/Users/IUserIdentity.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ public interface IUserIdentity
88
string FirstName { get; }
99
string LastName { get; }
1010
string FullName { get; }
11+
string? UserLanguage { get; }
1112
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
using BotSharp.Abstraction.Users.Models;
2+
using BotSharp.OpenAPI.ViewModels.Users;
23

34
namespace BotSharp.Abstraction.Users;
45

56
public interface IUserService
67
{
78
Task<User> GetUser(string id);
89
Task<User> CreateUser(User user);
10+
Task<Token> ActiveUser(UserActivationModel model);
911
Task<Token?> GetToken(string authorization);
1012
Task<User> GetMyProfile();
13+
Task<bool> VerifyUserUnique(string userName);
14+
Task<bool> VerifyEmailUnique(string email);
1115
}

‎src/Infrastructure/BotSharp.Abstraction/Users/Models/User.cs‎

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)