'Should run free function which logs in the terminal #group10':function(browser: NightwatchBrowser){
constscript=`
functionrun()public{
console.log("test running free function");
}`
constscript=`import "hardhat/console.sol";
functionrunSomething()view{
console.log("test running free run run");
}
`
browser
.addFile('test.script.sol',{content: script})
.click('*[data-id="play-editor"]')// run the script
.addFile('test.sol',{content: script})
.scrollToLine(3)
constpath="//*[@class='view-line' and contains(.,'runSomething') and contains(.,'view')]//span//span[contains(.,'(')]"
constpathRunFunction=`//li//*[@aria-label='Run the free function "runSomething" in the Remix VM']`
browser.waitForElementVisible('#editorView')
.useXpath()
.click(path)
.pause(3000)// the parser need to parse the code
.rightClick(path)
.execute(function(){
// @ts-ignore
document.querySelector('.shadow-root-host').shadowRoot.querySelector(`.monaco-menu span[aria-label='Run the free function "runSomething" in the Remix VM']`).parentElement.click()