@@ -4,7 +4,7 @@ module.exports = {
4
4
console . log ( 'Closing down...' ) ;
5
5
browser . end ( ) ;
6
6
} ,
7
- leaflet_02_getFeatureByGeometry : function ( browser ) {
7
+ leaflet_02_getFeatureByGeometry : async function ( browser ) {
8
8
var type = 'leaflet' ;
9
9
var exampleName = '02_getFeatureByGeometry' ;
10
10
commonTools . openExampleAndLoadMap ( browser , type , exampleName ) ;
@@ -14,19 +14,27 @@ module.exports = {
14
14
browser . waitForElementPresent ( '.leaflet-popup-content' , 10000 ) ;
15
15
var popupContent = '空间查询模式:INTERSECT' ;
16
16
browser . expect . element ( '.leaflet-popup-content' ) . text . to . be . contain ( popupContent ) ;
17
+ //
18
+ const resultElement = await browser . findElement ( '.leaflet-popup-content' ) ;
19
+ console . log ( 'Element Id:' , resultElement . getId ( ) ) ;
20
+ //
21
+ // browser.click('.leaflet-popup-close-button', function () {
22
+ // browser.waitForElementNotPresent('.leaflet-popup-content', 10000);
23
+ // });
24
+ browser . pause ( 1000 ) . moveTo ( resultElement . getId ( ) , 0 , 0 ) ;
17
25
browser . click ( '.leaflet-popup-close-button' , function ( ) {
18
26
browser . waitForElementNotPresent ( '.leaflet-popup-content' , 10000 ) ;
19
27
} ) ;
20
28
browser
21
- . pause ( 1000 )
22
- . moveTo ( null , 40 , - 40 )
29
+ . moveTo ( null , 10 , - 10 )
23
30
. pause ( 500 )
24
31
. mouseButtonClick ( )
25
32
. waitForElementPresent ( '.leaflet-popup-content-wrapper' , 10000 )
26
33
. waitForElementPresent ( '.leaflet-popup-content' , 10000 )
27
34
. expect . element ( '.leaflet-popup-content' )
28
35
. text . to . be . contain ( '国家:刚果(金)' ) ;
29
- browser . click ( '.leaflet-popup-close-button' ) . waitForElementNotPresent ( '.leaflet-popup-content' , 10000 ) ;
36
+ browser . pause ( 5000 ) ;
37
+ // browser.click('.leaflet-popup-close-button').waitForElementNotPresent('.leaflet-popup-content', 10000);
30
38
31
39
// browser.moveTo(null,-40,40, function () {
32
40
// browser.pause(1000);
0 commit comments