No.1

Q: How to fix the problem when “RuntimeError, line:7,Error: Driver action request failed.” appears in Output?

A: Once this happens,it means that the line7’s code execution failed and Lemonce Editor will stop running immediately.The following situations lead to this problem.

The page is not loaded yet.

Sometimes,although the page displays completely,the elements inside the page are not loaded, which leads that actionkeywords like click,input,move can’t find their operating element. Then you can add wait or assert statement before line7 to control the load of page.

The selector in the lc2 code cannot locate the corresponding element inside the page.

There are serveral reasons to cause the situation:

  • The user has written the wrong selector.

  • The selector in the page is dynamically generated. The selectors generated by pressing button in recording process will change when it comes to playback process. Here you need to write a relatively stable selector such as :contains() and so on.


No.2

Q: Can Lemonce open multiple browser windows?

A: Lemonce’s built-in webview is not a browser,so it doesn’t have the function of tab switching. Howerver you can use back or forward to complete switching pages. Click here to know more.


No.3


Q: Is there global variable that is for all of the test cases in a suite?

A: We do not have global variables at the moment. However, we have something that we think is better than globals. The import keyword,you can click here to see the video instruction. Example: If you have a globals.lc2 file, which contains all of your global variables. Let’s assume you have a link variable defined in that file.

The “global.lc2” file just like:

// defined global variable
var="Lemonce";
link="https://www.google.com";
 process main () {

 }
process jumpToGoogle() {
    jumpto link;//link is a variable
}

You can import that file just like:

 import './global.lc2'; // relative path to your file
// can use everything defined in globals now
process main () {
   jumpto link; // link is a variable defined in globals
   log var;// output "Lemonce"
   jumpToBaidu();// jump to google
 }