@@ -4,7 +4,7 @@ module.exports = {
44 console . log ( 'Closing down...' ) ;
55 browser . end ( ) ;
66 } ,
7- leaflet_02_getFeatureByGeometry : function ( browser ) {
7+ leaflet_02_getFeatureByGeometry : async function ( browser ) {
88 var type = 'leaflet' ;
99 var exampleName = '02_getFeatureByGeometry' ;
1010 commonTools . openExampleAndLoadMap ( browser , type , exampleName ) ;
@@ -14,19 +14,27 @@ module.exports = {
1414 browser . waitForElementPresent ( '.leaflet-popup-content' , 10000 ) ;
1515 var popupContent = '空间查询模式:INTERSECT' ;
1616 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 ) ;
1725 browser . click ( '.leaflet-popup-close-button' , function ( ) {
1826 browser . waitForElementNotPresent ( '.leaflet-popup-content' , 10000 ) ;
1927 } ) ;
2028 browser
21- . pause ( 1000 )
22- . moveTo ( null , 40 , - 40 )
29+ . moveTo ( null , 10 , - 10 )
2330 . pause ( 500 )
2431 . mouseButtonClick ( )
2532 . waitForElementPresent ( '.leaflet-popup-content-wrapper' , 10000 )
2633 . waitForElementPresent ( '.leaflet-popup-content' , 10000 )
2734 . expect . element ( '.leaflet-popup-content' )
2835 . 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);
3038
3139 // browser.moveTo(null,-40,40, function () {
3240 // browser.pause(1000);
0 commit comments