Git Product home page Git Product logo

Comments (7)

vanous avatar vanous commented on August 19, 2024 1

If this helps to anyone, opening the form in a new tab helped. Probably some dynamic typo3 magic.

from rpa.

vanous avatar vanous commented on August 19, 2024

I have just confirmed, that the same xpath //*[contains(@data-formengine-input-name,"username")] works correctly in Selenium IDE.

It seems to me, that during search, Kantu is unable to access some parts of the DOM, but i am unfortunately unable to see what it sees and what now :(

thank you

from rpa.

A9T9 avatar A9T9 commented on August 19, 2024

Hi! ...so this sounds like you found a workaround? That is good :)

But a "Dom not found" or "Nowhere to look for dom" should never happen. Therefore, if you have a way for us to recreate it (e. g. a test macro) please let us know (reopen the ticket) and we will debug and fix it.

from rpa.

vanous avatar vanous commented on August 19, 2024

HI! Thank you for getting back. I can replicate it pretty much anytime. Problem is, that the page is behind login. After bit of digging around, i found where typo3 runs a demo site of this generation of CMS, where you can replicate it too. Info about the demo site: http://demo.typo3.org/ , admin/password are credentials as per their instructions.
Demo url: http://cms-next.demo.typo3.org/typo3

Now, what i do is that i am filling form when creating new users in Backend Users (menu → Backend users (1)) , selecting Create new record (2) on the screenshot below:

screenshot from 2018-01-18 15-23-03

And then filling fields of the form:

screenshot from 2018-01-18 15-23-16

To be able to select these fields with dynamic IDs, xpath is required, see my full Test case below.

(for whatever reason, for the values to really get to the form, i have to emulate "click" followed by "type" my text from csv and then even "send keys" KEY_TAB, but that is minor).

{
"CreationDate": "2018-1-18",
"Commands": [
{
"Command": "csvRead",
"Target": "b.csv",
"Value": ""
},
{
"Command": "click",
"Target": "//[contains(@data-formengine-input-name,"username")]",
"Value": ""
},
{
"Command": "type",
"Target": "//
[contains(@data-formengine-input-name,"username")]",
"Value": "${!COL4}"
},
{
"Command": "sendKeys",
"Target": "//[contains(@data-formengine-input-name,"username")]",
"Value": "${KEY_TAB}"
},
{
"Command": "click",
"Target": "//
[contains(@data-formengine-input-name,"password")]",
"Value": ""
},
{
"Command": "type",
"Target": "//[contains(@data-formengine-input-name,"password")]",
"Value": "${!COL1}"
},
{
"Command": "sendKeys",
"Target": "//
[contains(@data-formengine-input-name,"password")]",
"Value": "${KEY_TAB}"
},
{
"Command": "click",
"Target": "link=Personal Data",
"Value": ""
},
{
"Command": "click",
"Target": "//[contains(@data-formengine-input-name,"company")]",
"Value": ""
},
{
"Command": "type",
"Target": "//
[contains(@data-formengine-input-name,"company")]",
"Value": "${!COL5}"
},
{
"Command": "click",
"Target": "//[contains(@data-formengine-input-name,"first_name")]",
"Value": ""
},
{
"Command": "type",
"Target": "//
[contains(@data-formengine-input-name,"first_name")]",
"Value": "${!COL2}"
},
{
"Command": "click",
"Target": "//[contains(@data-formengine-input-name,"last_name")]",
"Value": "${!COL3}"
},
{
"Command": "type",
"Target": "//
[contains(@data-formengine-input-name,"last_name")]",
"Value": "${!COL3}"
},
{
"Command": "click",
"Target": "//[contains(@data-formengine-input-name,"email")]",
"Value": ""
},
{
"Command": "type",
"Target": "//
[contains(@data-formengine-input-name,"email")]",
"Value": "${!COL4}"
},
{
"Command": "click",
"Target": "css=button.btn.btn-sm.btn-default.dropdown-toggle",
"Value": ""
},
{
"Command": "clickAndWait",
"Target": "link= Save and create a new one",
"Value": "3"
}
]
}

Hope this helps,

cheers
Petr

from rpa.

vanous avatar vanous commented on August 19, 2024

OK, some progress here. It seems to be virtual dom, probably in a iframe. I will get to the root of it :)

from rpa.

vanous avatar vanous commented on August 19, 2024

Solved, although I am not sure what the solution is, perhaps if the DOM contains iframes, show some info about it... perhaps this is out of scope of Kantu...

Here is what i did... Not sure what kantu equivalent is, this is how to get there in python selenuim, might be useful to someone:

driver.switch_to.default_content() #make sure to be on top of the main dom
driver.switch_to.frame(driver.find_elements_by_xpath('//iframe')[1]) #switch to iframe (second one in my case)
get elements now as usual

I haven't tried in Kantu yet.

from rpa.

JESii avatar JESii commented on August 19, 2024

FYI... I'm seeing this problem and have to reload the page to get things to work again. This is on an MUI/React component.

from rpa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.