@@ -373,7 +373,7 @@ module.exports = {
373373 function addr(bytes32 node) public virtual view returns (address);
374374 }
375375
376- function resolve () public view returns(address) {
376+ function resolveENS () view {
377377 // Same address for Mainet, Ropsten, Rinkerby, Gorli and other networks;
378378 ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e);
379379 (,bytes32 node) = NameEncoder.dnsEncodeName("vitalik.eth");
@@ -382,14 +382,19 @@ module.exports = {
382382 }
383383 `
384384 browser
385+ . clickLaunchIcon ( 'udapp' )
386+ . switchEnvironment ( 'vm-mainnet-fork' )
387+ . clickLaunchIcon ( 'filePanel' )
385388 . addFile ( 'test_mainnet.sol' , { content : script } )
386- . scrollToLine ( 15 )
387- const path = "//*[@class='view-line' and contains(.,'resolve') and contains(.,'view')]//span//span[contains(.,'(')]"
388- const pathRunFunction = `//li//*[@aria-label='Run the free function "resolve"']`
389- browser . waitForElementVisible ( '#editorView' )
389+
390+ const path = "//*[@class='view-line' and contains(.,'resolveENS') and contains(.,'view')]//span//span[contains(.,'(')]"
391+ const pathRunFunction = `//li//*[@aria-label='Run the free function "resolveENS"']`
392+ browser . waitForElementVisible ( '#editorView' )
393+ //.waitForElementPresent(pathRunFunction)
394+ . pause ( 10000 ) // the parser need to parse the code
390395 . useXpath ( )
396+ . scrollToLine ( 16 )
391397 . click ( path )
392- . pause ( 3000 ) // the parser need to parse the code
393398 . perform ( function ( ) {
394399 const actions = this . actions ( { async : true } ) ;
395400 return actions
0 commit comments