RSelenium
RSelenium copied to clipboard
findElements Javascript
Hey ALL, Can anyone give me some advice by using FindElement to click some button in the website, which is under the Javascript function. I had no problem working on the html. But after
Thanks.
Can you find it with xpath or CSS?
findelement("xpath", "here xpath you find by inspecting javascript button")
I tried CSS it will work only if i run after one page is opened. If I run by itself, then it won't work. The error shows that Selenium message:no such element: Unable to locate element: {"method":"css selector","selector":".GrBlueTreeNodeSelected b"}
My guess was that the button I tried to make them click is in the subcategory of the main button. and the code was written in the Javascript. <type="text/javascript"> Do you know how are we supposed to solve this kind of problem?
Can you post reproducible example? Site and your code.
The idea is that the code can work if i run it line by line. But if i run it together. then there will be error in certain point after login into the account. I tried to make the page load first and then run but it still doesn't work. Maybe I can try to reproduce some other public sites.
i think it's the program when i login into the website, the button is under some other body html. That's why it won't be able to find that button element. Since that element is underneath of the table in the html website somewhere.
Why don't you show which website are you talking about?