Closed rjkothari closed 3 months ago
Hi @rjkothari
Visual automation will click on the middle of the picture (log-in.png). Visual automation also depends on several parameters like machine/browser zoom setting, image resolution. For web elements, I would suggest you to use XPath instead of visual automation, for instance:
click //*[@id="login_submit"]
If for some reason you have to stick to visual automation, you can try setting the machine/browser zoom setting to 100% and if you are using macOS, check that the snapshot of the image is 72ppi.
Regarding your other queries:
I tried using XPath, as you can see,. But, it gives syntax error:
Unexpected token "=" (seems to be in this line - read (*@id=)
Hi @rjkothari as mentioned in the comment above, you can try the XPath without the brackets.
email
as user_email
type password
as user_password
Click log-in.png
wait 5
Click abcd dkdkfd dfjkdjfd dafkdjkfjdf dfdkdj fd
wait 2
Click Plain-text.png
wait 3
read //*[@id="message-htmlpart1"]/div to message-txt
echo 'message-txt'
keyboard [ctrl]a
keyboard [ctrl]c
message_text = clipboard()
wait 3
Echo 'message_text'
wait 5See error during execution below:
C:\tagui\flows\first>tagui first.tag SyntaxError: Unexpected token '='
phantomjs://code/first.tag.js:2017 in injectJs phantomjs://code/bootstrap.js:456
Hi @rjkothari
I think the error is due to the variable, not XPath.
Try removing the hyphen in the variable like this:
read //*[@id="message-htmlpart1"]/div to messageTxt
Also, FYI to echo the variable you have to wrap them in between backticks and not quotation mark. Backticks are at the top left hand corner of your keyboard `
echo `messageTxt`
Ok. It worked a bit. But, I'm unable to make X-Path click work. Only visual click is working properly. Either tagui is not able to 'click' or not able to find X-Path. See recent output below.
START - automation started - Wed Sep 07 2022 16:43:43 GMT https://abcd.managewoc.org:2096/ - Webmail Login
wait 2 type Email Address as xxxx@abcdefg.xyz type Password as xxxxxxx click //*[@id="login-wrapper"] wait 5 Click abcd dkdkfd dfjkdjfd dafkdjkfjdf dfdkdj fd ERROR - cannot find abcd dkdkfd dfjkdjfd dafkdjkfjdf dfdkdj fd
C:\tagui\flows\first>tagui first.tag
START - automation started - Wed Sep 07 2022 16:45:04 GMT https:///abcd.managewoc.org:2096/ - Webmail Login
wait 2 type Email Address as xxxx@abcdefg.xyz type Password as xxxxxxx Click C:/tagui/flows/first/log-in.png wait 5 Click abcd dkdkfd dfjkdjfd dafkdjkfjdf dfdkdj fd wait 2 Click C:/tagui/flows/first/Plain-text.png wait 3 read //*[@id="message-htmlpart1"]/div to MessageTxt *ERROR - cannot find //[@id="message-htmlpart1"]/div**
Hi @rjkothari first I hope this account you're sharing is a dummy or test account. Otherwise please remove the credentials asap.
I am not sure which "Request for the Free SecureNT Intranet SSL Certificate" do you intend to click because there are many similar text that appear on the screen such as the ones on the left like this.
For the Plain text button, it is nested within an iframe but due to some reasons does not get picked up by the frame step as well. In this case you would have to fall back on visual automation.
Let us know if you face any issues using visual automation.
Thanks for your help.
Regarding which request you wish to click, yes, you are right. I thought I will figure it out later.
Visual animation is not reliable. Sometimes it clicks in the centre of the image but most of the time it clicks slightly above on right side or outside the image. I made image bigger also but still same result. i would say it's not reliably working.
Also, for last 2 days I'm facing issue with my ISP because TagUI seems to make several unsuccessful login attempts before it manages to login correctly. They have blacklisted my IP several times due to these unsuccessful login attempts.
Closing but please ping back if this is still relevant or an issue.
I tried to use tagui on email client and found that 'click' command works sometimes and other times it clicks slightly away, giving unreliable results.
https://abcd.managewoc.org:2096/ wait 2 // Look in tagui_local.csv in the flow's folder for a value for 'email' and find that element // if tagui_local.csv doesn't exist, then look in tagui_global.csv in tagui/src folder // and tries the same thing, so when the flow is run, it will become // type Email Address as xxxx@abcdefg.xyz type
email
asuser_email
typepassword
asuser_password
Click log-in.png wait 5 Click abcd dkdkfd dfjkdjfd dafkdjkfjdf dfdkdj fd wait 2 Click Plain-text.png wait 3 read (//*[@id="message-htmlpart1"]/div) to message-txt echo 'message-txt' keyboard [ctrl]a keyboard [ctrl]c message_text = clipboard() wait 3 Echo 'message_text' wait 5Also, noticed following problems: