@@ -13,7 +13,17 @@ import output from '../output.js'
1313const { debug } = output
1414import { empty } from '../assert/empty.js'
1515import { truth } from '../assert/truth.js'
16- import { xpathLocator , fileExists , decodeUrl , chunkArray , convertCssPropertiesToCamelCase , screenshotOutputFolder , getNormalizedKeyAttributeValue , modifierKeys } from '../utils.js'
16+ import {
17+ xpathLocator ,
18+ fileExists ,
19+ decodeUrl ,
20+ chunkArray ,
21+ convertCssPropertiesToCamelCase ,
22+ screenshotOutputFolder ,
23+ getNormalizedKeyAttributeValue ,
24+ modifierKeys ,
25+ normalizePath ,
26+ } from '../utils.js'
1727import { isColorProperty , convertColorToRGBA } from '../colorUtils.js'
1828import ElementNotFound from './errors/ElementNotFound.js'
1929import ConnectionRefused from './errors/ConnectionRefused.js'
@@ -1851,7 +1861,7 @@ class WebDriver extends Helper {
18511861 const currentUrl = await this . browser . getUrl ( )
18521862 const baseUrl = this . options . url || 'http://localhost'
18531863 const actualPath = new URL ( currentUrl , baseUrl ) . pathname
1854- return equals ( 'url path' ) . assert ( path , actualPath )
1864+ return equals ( 'url path' ) . assert ( normalizePath ( path ) , normalizePath ( actualPath ) )
18551865 }
18561866
18571867 /**
@@ -1861,7 +1871,7 @@ class WebDriver extends Helper {
18611871 const currentUrl = await this . browser . getUrl ( )
18621872 const baseUrl = this . options . url || 'http://localhost'
18631873 const actualPath = new URL ( currentUrl , baseUrl ) . pathname
1864- return equals ( 'url path' ) . negate ( path , actualPath )
1874+ return equals ( 'url path' ) . negate ( normalizePath ( path ) , normalizePath ( actualPath ) )
18651875 }
18661876
18671877 /**
0 commit comments