File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -1200,6 +1200,8 @@ Returns **([Promise][25]<DOMRect> | [Promise][25]<[number][22]>)** Element
1200
1200
1201
1201
### grabGeoLocation
1202
1202
1203
+ This method is **deprecated**.
1204
+
1203
1205
Return the current geo location
1204
1206
Resumes test execution, so **should be used inside async function with ` await ` ** operator.
1205
1207
@@ -2018,6 +2020,8 @@ Returns **void** automatically synchronized promise through #recorder
2018
2020
2019
2021
### setGeoLocation
2020
2022
2023
+ This method is **deprecated**.
2024
+
2021
2025
Set the current geo location
2022
2026
2023
2027
` ` ` js
Original file line number Diff line number Diff line change @@ -2448,21 +2448,25 @@ class WebDriver extends Helper {
2448
2448
}
2449
2449
2450
2450
/**
2451
+ * This method is **deprecated**.
2452
+ *
2453
+ *
2451
2454
* {{> setGeoLocation }}
2452
2455
*/
2453
2456
async setGeoLocation ( latitude , longitude , altitude = null ) {
2454
- if ( altitude ) {
2455
- return this . browser . setGeoLocation ( { latitude, longitude } ) ;
2456
- }
2457
- return this . browser . setGeoLocation ( { latitude, longitude, altitude } ) ;
2457
+ console . log ( `setGeoLocation deprecated:
2458
+ * This command is deprecated due to using deprecated JSON Wire Protocol command. More info: https://webdriver.io/docs/api/jsonwp/#setgeolocation` ) ;
2458
2459
}
2459
2460
2460
2461
/**
2462
+ * This method is **deprecated**.
2463
+ *
2461
2464
* {{> grabGeoLocation }}
2462
2465
*
2463
2466
*/
2464
2467
async grabGeoLocation ( ) {
2465
- return this . browser . getGeoLocation ( ) ;
2468
+ console . log ( `grabGeoLocation deprecated:
2469
+ * This command is deprecated due to using deprecated JSON Wire Protocol command. More info: https://webdriver.io/docs/api/jsonwp/#getgeolocation` ) ;
2466
2470
}
2467
2471
2468
2472
/**
Original file line number Diff line number Diff line change @@ -1163,7 +1163,8 @@ describe('WebDriver', function () {
1163
1163
} ) ;
1164
1164
1165
1165
describe ( 'GeoLocation' , ( ) => {
1166
- it ( 'should set the geoLocation' , async ( ) => {
1166
+ // deprecated JSON Wire method commands
1167
+ it . skip ( 'should set the geoLocation' , async ( ) => {
1167
1168
await wd . setGeoLocation ( 37.4043 , - 122.0748 ) ;
1168
1169
const geoLocation = await wd . grabGeoLocation ( ) ;
1169
1170
assert . equal ( geoLocation . latitude , 37.4043 , 'The latitude is not properly set' ) ;
You can’t perform that action at this time.
0 commit comments