aisingapore / TagUI

Free RPA tool by AI Singapore
Apache License 2.0
5.66k stars 585 forks source link

document.querySelector set attribute (id /style) exception #1265

Closed cousin-wang closed 3 months ago

cousin-wang commented 2 years ago

Hello @kensoh i hope you are fine.

all is error document.querySelector('#toAreaCtrl .addr_text').style.width="100px"; document.querySelector('#toAreaCtrl .addr_text').setAttribute("id","wwww")

微信截图_20220728171657 微信截图_20220728172219
ruthtxh commented 2 years ago

Hi @cousin-wang

Seems like your method of identifying the element is not working. The following works for me on this sample website and identifying the element with queryselector.

https://www.google.com/doodles
dom begin
document.querySelector('#latest-title').style.backgroundColor = "blue";
dom finish
wait 15

Do you have the website for us to inspect?

cousin-wang commented 2 years ago

thanks @ruthtxh

the flellowing code is ths same element. the first is not working. dom document.querySelector('#s_btn_wr .btn').style.color="#ab1313"; document.querySelector('#su').style.color="#ab1313"

i use querySelector('#s_btn_wr .btn').id or document.querySelector('#su').id that is is not working/exception . but I have no [id] ,How to do?

http://www.baidu.com/ dom document.querySelector('#su').id="12344"; wait 10

cousin-wang commented 2 years ago
微信截图_20220729171726

because input donot have [id] thranks @ruthtxh

kensoh commented 2 years ago

Hi @cousin-wang thanks for using TagUI, and of course @kangyiwen for promoting TagUI in China!

I'm good, I've moved to London and started work there. @ruthtxh is taking over my work with TagUI.

And I trust that she is ready to bring the project to the next level! Beyond what I can achieve.

kensoh commented 2 years ago

PS - Btw @ruthtxh, if AI Singapore wants to collapse TagUI repo into aimakerspace, that is theoretically doable. By right, GitHub will map and redirect old URLs pointing to kelaberetiv to aimakerspace. There is probably going to be some rough unexpected situations for migrating over when you will only know when you do it. But just want to highlight that it is doable. I notice that kelaberetiv org isn't being actively developed but instead aimakerspace, so I thought to flag this out to you.

ruthtxh commented 2 years ago

Hi @cousin-wang

I'm not sure which element you're looking for on the page, because when I do a search for that id/class in the dev tools elements it does not point to a particular element.

Here's an example of changing the background color of the search button on baidu.

To get the class of the button, I inspected the element by right clicking. For instance: image

http://www.baidu.com/
dom document.querySelector('.bg .s_btn').style.backgroundColor = "#ab1313";

FYI when using querySelector if there are more than one elements with the same css identifier, it will only pick the first one on in the list if you are using it this way.

ruthtxh commented 2 years ago

Hi @kensoh, thanks for the suggestions! We are actually migrating from both kelaberativ and aimakerspace to a new github org soon.

kensoh commented 2 years ago

Oh sounds exciting!!

For my side, I have a links to this repo from my website tebel.org, and from Python rpa package readme.

If you remember to, just ping or @me when you have migrated. I'll update the links if they break.

ruthtxh commented 2 years ago

Hi @kensoh FYI we have migrated our repo to the new org https://github.com/aisingapore/TagUI/. The old link should redirect to the new one too.

kensoh commented 2 years ago

Thanks @ruthtxh I happen to see, and yes the links from RPA for Python GitHub page redirect correctly to the new repo =)

kensoh commented 2 years ago

(I've updated the links there and on tebel.org anyway, and verified the links to aisingapore's org work)

kensoh commented 2 years ago

Btw @ruthtxh, I notice that all AISG folks show their membership in aisinapore org as private. This is the default GitHub setting (private). That means anyone visiting aisingapore org GitHub page will not see its members. It also means that people viewing the staff's GitHub profiles will not see the aisingapore logo there.

Not sure if this is intended or not being aware. Fyi, in case it is due to unawareness so this marketing opportunity is missed.

kensoh commented 2 years ago

You can test by visiting this link in private tab of browser - https://github.com/aisingapore

Private/Public setting can be changed individually at - https://github.com/orgs/aisingapore/people

kensoh commented 3 months ago

Closing but please ping back if this is still relevant or an issue.