-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XPath element not found; Chrome extension only records as a hidden title #500
Comments
Hi @Cathy21, yes it is likely due to the website you are automating on. The Chrome recorder is not fool-proof because of many variations in web design standards. You can try using the name attribute by https://github.com/kelaberetiv/TagUI#find-xpath-of-web-element |
Thank you for the quick response! I checked the path and it was inside an iframe so I used frame{} - I can now type into the input box but I am unable to click on the checkbox. This is the checkbox - only the highlighted area corresponds to the checkbox element - anything else below is associated to other elements in the same row. This is after I click the checkbox normally. I am using the XPath to locate the checkbox and the name does not change. frame e1menuAppIframe |
Hi Cathy, normally below code will work for this situation, since name is usually unique identifier -
If above does not work, it could be a non-standard design in checkbox. Try the following -
If above cannot work, you can try sharing your replication code here so that I can take a look. PS - the backtick is now the new way of denoting variables - eg above for $itemno |
I tried using the code that you provided but it did not work. Here is what I tried for your suggestions:
I don't believe there is a way to set it so that it is clicked. The only indication that the checkbox is marked are the changes that appear in the photo from my latest reply. The two lines of code I tried did not work (tried separately).
tl:dr - Only Visual Automation with coordinates works but is not ideal for the process I am automating. I can send the script and screenshots of the chrome inspector console for the page I am automating but unfortunately it is a company page that can only be accessed with specific credentials and on the company server. (I will email the script and screenshots) Once again, thank you so much for the quick response and help! As a first time user of TagUI and automation tools in general, it has been very helpful. |
Hi @Cathy21 got it, I received the details in your email. It looks like after clicking, the only change is the class of the checkbox has an additional
|
When I tried the visual automation in my previous response, I tried it on both the recommended resolution and 100% but it was still clicking at the wrong spot- I currently have an external monitor attached that is extended from my laptop but I took the screenshot on the laptop screen which is where the automation runs. It seems like the program is having a lot of difficulty finding many of the elements in the frame in general. For now, I am using keystrokes to navigate through the frame I am working in and that works pretty well. I tried the Ctrl f option and that works pretty well on a checkbox on another page I am automating and therefore no longer need the mouse coordinates! Unfortunately the page with the checkbox I was originally specifying has a weird tabbing order and would require me to tab through almost half the elements on the page before I get to the checkbox. However the easy workaround for this specific site was just to customize the columns that appear so that I could tab directly from the search bar. Overall, the general solution was using Thanks for the help! While this may not be an ideal solution for everyone, it works well enough on the website I am using to get the job done! |
Great, thanks for sharing the update! You can try below to see if that speeds up, by bundling keystrokes in 1 command -
|
Is there a difference between keyboard and vision type? Is there one that is preferred over the other? |
Yes, vision is a workaround in the past to send custom commands to SikuliX, the computer vision and OCR engine used by TagUI. But since TagUI v5, keyboard step is introduced and that is the preferred (easier and more readable) way to send complex keystrokes. Both ways work. TagUI v4
TagUI v5
|
Using keyboard and bundling keystrokes was much faster! Thank you for all the help :) |
Hi @kensoh
|
I haven't come across this issue of loops in frame. Your structure looks correct. First check if the If the identifier does not change, try the following to see if it helps -
|
Closing issue for now until further inputs! |
I'm currently writing a script to automate data insertion in a company website. I am trying to type into a input field but TagUI can not find it. The element I am trying to find is
<input type = "text" class="textfield autosuggesttextfield" autocomplete="off" tit;e="3rd Item Number" maxlength="28" tabindex="2" name="qbe0_1.0" style="width: 156px; padding-bottom: 1px; cursor: auto;" prevwidth="156">
I tried using the TagUI chrome extension but for every action it says "click menutitle_hidden"
Is this an issue with the site I am using? I can login and navigate to the specific page in TagUI just fine but it can not find any element on the page.
The text was updated successfully, but these errors were encountered: