Cannot Create a new element on EZpublish

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Cannot Create a new element on EZpublish

by Elvico on Tue Jan 31, 2017 8:39 am

VERSION BUILD=9030808
Firefox 51 on Mac OS

Hi all, I'm a beginner on imacro.
I'm trying to create a new elements on eZ Publish using imacro

Unfortunaltly, the button is made with javascript, clicking on it shows a list of elements types, I need to select one of them to create an element of that type.

I cannot share my account and I couldn't find any demo. What do you guys need to help me ?

Thank you for your help.
Elvico
 
Posts: 3
Joined: Tue Jan 31, 2017 6:40 am

Re: Cannot Create a new element on EZpublish

by chivracq on Tue Jan 31, 2017 10:40 am

Elvico wrote:
Code: Select all
VERSION BUILD=9030808
Firefox 51 on Mac OS


Hi all, I'm a beginner on imacro.
I'm trying to create a new elements on eZ Publish using imacro

Unfortunaltly, the button is made with javascript, clicking on it shows a list of elements types, I need to select one of them to create an element of that type.

I cannot share my account and I couldn't find any demo. What do you guys need to help me ?

Thank you for your help.

Yep, I don't know this "EZpublish" or "eZ Publish"...

It would already help if you could post what gets recorded when you click on that Button and then select one of those "Element Types"...
+ Mention/describe what happens when you try to replay this mini-Script, if the Button gets clicked, if the List opens, if an Element gets selected, etc...?
+ Do you get any RuntimeError...? (With '!ERRORIGNORE' disabled if you use it...)

If the List of Elements gets dynamically populated, adding some mini-'WAIT' Statement between the click on the Button and the Click on the 'Select Item' could help as well...

Otherwise, you can try the 'EVENT' Mode as well...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6475
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Cannot Create a new element on EZpublish

by Elvico on Thu Feb 02, 2017 3:02 am

Ok I found the solution, here is my share

Code: Select all
URL GOTO=javascript:(function(){$('form[name=children]').append($('<input%20type="hidden"%20name="ClassID"%20value="'%20+%2058%20+%20'"%20/>')).append($('<input%20type="hidden"%20name="NewButton"%20/>')).submit()})();


When you clic on "Create a new element", a javascript poplist appear where from you can choose de type of element you want to create.
In my exemple, I need to create the element value 58.

.....name="ClassID"%20value="'%20+%2058%20+%20'"%20.....

Enjoy ! :)
Elvico
 
Posts: 3
Joined: Tue Jan 31, 2017 6:40 am

Re: Cannot Create a new element on EZpublish

by chivracq on Thu Feb 02, 2017 8:15 am

Elvico wrote:Ok I found the solution, here is my share

Code: Select all
URL GOTO=javascript:(function(){$('form[name=children]').append($('<input%20type="hidden"%20name="ClassID"%20value="'%20+%2058%20+%20'"%20/>')).append($('<input%20type="hidden"%20name="NewButton"%20/>')).submit()})();


When you clic on "Create a new element", a javascript poplist appear where from you can choose de type of element you want to create.
In my exemple, I need to create the element value 58.

.....name="ClassID"%20value="'%20+%2058%20+%20'"%20.....

Enjoy ! :)

Woaw...!, that's an impressive Solution, especially from a "Newbie", ah-ah...! Thanks for sharing of course... (Wondering btw how you managed to find such a Solution...?)

A bit "surprised" :shock: that you ignored my previous Reply (I'm not sure I will be motivated then to try to help you again, ah-ah...!, but sharing your Solution is a plus-point...) and that you didn't try/react to my Suggestions, I would have expected the 'EVENT' Mode to "do the job" as well...

I am btw a little bit surprised that your Sol works on v9.0.3 for FF where those 'URL GOTO=javascript:' Statements have been "tightened" and many Statements (accessing the DOM and 'document') previously working in v8.8.x or v8.9.x for FF do not work anymore in v9.0.3 for FF. But good News anyway.

Interesting would have been if you had posted what iMacros records (in Standard 'TAG' Mode + Full HTML 'TAG' Mode + 'EVENT' Mode) on those 2 Elements and what HTML/JavaScript is behind those Elements from the Source (even if that part can approx be reconstructed from your Sol) to make your Sol reusable for some other Cases/Sites.
But OK, never mind, good that you found a Solution (and shared it). 8)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6475
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Cannot Create a new element on EZpublish

by Elvico on Thu Feb 02, 2017 9:26 am

I'm a noob but a dev mate showed me how to pass the button by typing the following command to the inspector console :

Code: Select all
$('form[name=children]').append($('<input type="hidden" name="ClassID" value="' + 58 + '" />')).append($('<input type="hidden" name="NewButton" />')).submit()


I googled and found this post : http://forum.imacros.net/viewtopic.php?t=7906
that gave me the idea of using URL GOTO javascript

I ignored your previous reply because I found the solution before I read it, so I still have no idea what the EVENT do :)
Elvico
 
Posts: 3
Joined: Tue Jan 31, 2017 6:40 am

Re: Cannot Create a new element on EZpublish

by chivracq on Thu Feb 02, 2017 10:52 am

Elvico wrote:I'm a noob but a dev mate showed me how to pass the button by typing the following command to the inspector console :

Code: Select all
$('form[name=children]').append($('<input type="hidden" name="ClassID" value="' + 58 + '" />')).append($('<input type="hidden" name="NewButton" />')).submit()


I googled and found this post : http://forum.imacros.net/viewtopic.php?t=7906
that gave me the idea of using URL GOTO javascript

I ignored your previous reply because I found the solution before I read it, so I still have no idea what the EVENT do :)

OK, and Thanks for the (partial) Follow-up, ah-ah...!

But, hum, a big Heads up to your Dev-mate ah-ah...!, hum and to you as well, for being able to search the Forum and to manage to convert that Statement for Use with 'URL GOTO=javascript:', even if that Solution won't be easy to reuse for other Cases/Sites without knowing the Source of your Page as it is "tailored" to your Site/Page, but the good News as I said is that it (still) works on v9.0.3 for FF, I guess because it doesn't use 'document' as I would think that the direct Solution from the Thread you refer to (from 2009, oops...!) wouldn't work anymore in v9.0.3 as it uses 'document'...

Well, about "ignoring" my Reply because you had found another Solution in the meantime is never a "good Argument" in my Eyes, you ask a Qt on a Forum, sbd replies trying to help you, perfect that you find another Solution in the meantime and you come and share it in the Thread, but you must have noticed my Reply when you posted after me, and some "basic Forum Etiquette" implies some little "Acknowledgment" of previous Replies if sbd spent some time trying to help you..., you never know if you won't need Help again...
But don't worry, you've handled your Thread already better than "Average" on this Forum by most Users, ah-ah...! (I guess I am too much of an "Idealist"/ "Perfectionist", oops...!)

Well, concerning the 'EVENT' Mode, read a bit of Documentation about it, and about all iMacros Commands I would say (where you'll find a direct Link to the Wiki Page for the 'EVENT' Mode), if you want to use iMacros to its full Potential, and you can "experiment" with it from the iMacros Record Options, the 'EVENT' Mode might be your best Friend one day, ah-ah...! :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6475
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 7 guests

-->