Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[1.9.4] - 2022-05-13
### Changed
- Improve "user opens relative URL" step

[1.9.3] - 2022-05-12
### Changed
- Fix table rows count assertion message.
Expand Down
2 changes: 1 addition & 1 deletion src/Behavioral.Automation/Behavioral.Automation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The whole automation code is divided into the following parts:
- UI structure descriptive code
- Supportive code</Description>
<Copyright>Quantori Inc.</Copyright>
<PackageVersion>1.9.3</PackageVersion>
<PackageVersion>1.9.4</PackageVersion>
<RepositoryUrl>https://github.com/quantori/Behavioral.Automation</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
Expand Down
12 changes: 11 additions & 1 deletion src/Behavioral.Automation/Bindings/NavigationBInding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ public NavigationBinding([NotNull] IDriverService driverService,
[When("user opens URL \"(.*)\"")]
public void Navigate([NotNull] string url)
{
_driverService.Navigate(url);
if(IsAbsoluteUrl(url))
{
_driverService.Navigate(url);
return;
}
_driverService.Navigate(ConfigServiceBase.BaseUrl + url);
}

/// <summary>
Expand Down Expand Up @@ -136,5 +141,10 @@ public void ReloadCurrentPage()
{
_driverService.Refresh();
}

private static bool IsAbsoluteUrl(string url)
{
return Uri.IsWellFormedUriString(url, UriKind.Absolute);
}
}
}