Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about QM3 Some suggestions
Also please show your Documents\LibreAutomate\.settings\Layout.xml
<stack o="v">
    <stack o="h">
        <toolbar name="Menu" />
        <toolbar name="Help" z="684" />
        <toolbar name="Tools" floatRect="997 112 254 41 96 2" />
        <toolbar name="Custom1" z="515*" />
    </stack>
    <stack o="h" z="914*" s="1">
        <stack o="v" z="231">
            <toolbar name="File" />
            <tab z="699*" s="1" captionAt="Top">
                <panel name="Files" captionAt="Top" floatRect="300 232 249 330 96 2" />
                <panel name="Cookbook" captionAt="Top" floatRect="129 106 245 715 96 2" />
                <panel name="Outline" captionAt="Top" floatRect="103 115 245 715 96 2" />
            </tab>
            <tab z="184" s="1" captionAt="Top">
                <panel name="Find" captionAt="Top" />
                <panel name="Bookmarks" captionAt="Top" floatRect="223 792 261 217 96 2" />
                <panel name="Breakpoints" captionAt="Top" />
            </tab>
        </stack>
        <stack o="v" z="1465*" s="1">
            <stack o="v" z="874*">
                <stack o="h">
                    <toolbar name="Run" />
                    <toolbar name="Edit" floatRect="610 245 420 41 96 2" />
                    <toolbar name="Custom2" z="781*" />
                </stack>
                <stack o="h" z="660*" s="1">
                    <stack o="h" z="100*">
                        <panel name="Recipe" z="623*" captionAt="Top" floatRect="1079 42 821 969 96 0" window="Unowned" />
                        <document name="documents" z="645*" s="1" captionAt="Right" />
                    </stack>
                    <panel name="Debug" z="373" captionAt="Top" state="1" />
                    <stack o="v" z="194" s="1">
                        <panel name="Open" z="445*" captionAt="Top" floatRect="1205 354 249 177 96 2" />
                        <panel name="Tasks" z="217*" s="2" captionAt="Top" floatRect="1176 351 319 561 96 2" />
                    </stack>
                </stack>
                <tab z="187" s="1" floatRect="437 816 1304 178 96 2">
                    <panel name="Output" floatRect="451 818 1304 178 96 2" />
                    <panel name="Found" floatRect="437 816 1304 178 96 2" />
                </tab>
            </stack>
            <panel name="Mouse" z="37" s="1" floatRect="619 838 1085 198 96 2" />
        </stack>
    </stack>
    <panel name="Mouse2" ext="" z="38*" state="1" />
</stack>

Quote:What is the screen DPI? (Settings > System > Display > Scale).

100%
With your Layout.xml the splitter cursor is displayed normally on my PC. If your mouse device and settings are OK or can't be changed, maybe it is yet another WPF quirk that occurs on some computers. Exit LA and edit the xml file:

<document name="documents" z="645*" s="1" captionAt="Right" />
->
<document name="documents" z="645*" s="4" captionAt="Right" />
thank you!
This issue isn't too important. change it to 2 or a higher value, everything works fine.
s="2"
ver: 1.5.0
In the example code from the cookbook below, there is no `nuget install xxxx` prompt in the output pane during execution. I remember that in many cases, this prompt link would be added to the output pane, and when I clicked it, it would automatically open the NuGet installation dialog. This is very convenient.
 
Code:
Copy      Help
/*/ nuget -\Microsoft.Web.WebView2; /*/

using Microsoft.Web.WebView2.Wpf;
using System.Windows;
using System.Windows.Controls;

var b = new wpfBuilder("Window").WinSize(700, 600);
b.Row(-1).Add(out WebView2 k);
b.R.AddSeparator();
b.R.AddOkCancel();
b.End();

b.Loaded += () => {
    var env = Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(null, @"C:\Temp", null).Result;
    k.EnsureCoreWebView2Async(env);
    k.Source = new("https://www.google.com");
};

if (!b.ShowDialog()) return;
The link is in the last printed line. Also in the tooltip.
Quote:Script114.cs(1,11): error in meta: NuGet package not installed: -\Microsoft.Web.WebView2
    Install Microsoft.Web.WebView2...
or
Quote:Script114.cs(1,11): error in meta: NuGet package not installed: -\Microsoft.Web.WebView2
    Replace code `nuget -\Microsoft.Web.WebView2` with `nuget GUI\Microsoft.Web.WebView2`
    Or install or move Microsoft.Web.WebView2 to folder -.
https://i.ibb.co/GRRSTQn/A.png

In the past, there used to be an installation link at the end (or possibly the beginning) of the error message, and clicking it would automatically open the NuGet Package Manager dialog.
It means the NuGet package was installed, but now some files are missing. Unusual. Maybe in portable LA, when some files excluded when copying.
I often encounter the situation mentioned above. Sometimes, I copy some files from the `.nuget` folder of the LA installed version to the corresponding folder in the LA portable version. Sometimes it doesn't work, and it might be due to missing some files. I'm confused about this.

In LP scripts, the NuGet packages referenced by the code are automatically downloaded and installed, even in the free version of LP.
https://i.ibb.co/FHHYxtf/B.png

PS: To implement automatic installation of library files using NuGet in LA, it is necessary to eliminate the .NET SDK, which currently seems somewhat challenging.
I need to fill several text input fields on a webpage in Google Chrome.
The following code works, but I have to add a 1-second delay; otherwise, the last text fills in the first text box.

In some other commercial RPA software, the steps recorded with the recording function can execute very stably without adding delays.
Most commercial RPA software uses XPath or CSS selectors for element positioning, but it seems that this method is not supported in LA or QM.

Is there a better implementation method in LA? thanks.
 
Code:
Copy      Help
var w4 = wnd.find(3, "test - Google Chrome", "Chrome_WidgetWin_1").Activate();
var e4 = w4.Elm["web:TEXT", "t1"].Find(3);
e4.SendKeys("Ctrl+A", "!1");
1.s();

var w5 = wnd.find(3, "test - Google Chrome", "Chrome_WidgetWin_1").Activate();
var e5 = w5.Elm["web:TEXT", "t2"].Find(3);
e5.SendKeys("Ctrl+A", "!a");
1.s();

var w6 = wnd.find(3, "test - Google Chrome", "Chrome_WidgetWin_1").Activate();
var e6 = w6.Elm["web:TEXT", "t3"].Find(3);
e6.SendKeys("Ctrl+A", "!b");
1.s();

var w7 = wnd.find(3, "test - Google Chrome", "Chrome_WidgetWin_1").Activate();
var e7 = w7.Elm["web:TEXT", "t4"].Find(3);
e7.SendKeys("Ctrl+A", "!c");

Sometimes, SendKeys Ctrl+A selects all the text on the entire webpage. Filling in the text boxes is the most troublesome issue I've encountered. Sad
Does LA have a parameter similar to QM's *spe* parameter?
Code:
Copy      Help
opt save; opt slowkeys; spe 100

I just tested it hundreds of times in Google Chrome. Unfortunately, the browser crashed and showed the following message:
error code:Out of Memory
If you type spe in LA, it shows speSnippet. It shows how to change the speed of keyboard, clipboard and mouse functions.
SendKeys calls Focus and keys.send. No waiting. In Chrome Focus is either async or not always works. Try to create an extension method that calls Focus, then maybe waits eg 100 ms, then clicks the element, then calls keys.send.

Instead of XPath etc in LA you can use "Add to path" in the tool.
Quote:If you type spe in LA, it shows speSnippet. It shows how to change the speed of keyboard, clipboard and mouse functions.

Thank you for the suggestion. I previously searched for the keyword "speed" in the cookbook, but the articles I found didn’t mention these code snippets. Adding them to the article would make it more convenient.
https://i.ibb.co/CvFRMcn/A.jpg

Additionally, the "spe 100" parameter in QM seems to add a delay to each operation. Which parameter in LA corresponds to it? Would it be the following?
opt.key.SleepFinally = opt.mouse.ClickSleepFinally = 100;


Quote:Try to create an extension method that calls Focus, then maybe waits eg 100 ms, then clicks the element, then calls keys.send.

I don’t quite understand the meaning of this sentence. Could you create a code example using the form below? The links below contain many web testing projects, and if LA code examples for these projects could be provided, it would be great. This would allow for a deeper understanding or testing of the convenience and stability of LA’s code. Thank you!
https://demoqa.com/automation-practice-form

I can truly feel the magic of the code generated or provided by LA—just a few lines can solve the problem. Compared to the graphical interface provided by commercial RPA tools, it operates more efficiently and runs faster.
Adding more complete example code for web or desktop operations would help newcomers get started with LA more quickly.  Wink


Forum Jump:


Users browsing this thread: 13 Guest(s)