[HELP]Sample YAML file for configuring Multifield in Custom Dialog fields
Closed this issue · 6 comments
@CognifideLabs @mmajchrzak
I am trying to configure the multifield available in custom dialog fields. Can you please provide sample YAML file for configuring Multifield in Custom Dialog fields.
Once click on Add field on attached Mutiple fields open up. Would like to configure all the field by componentconfiguration function available in wiki. can you please suggest how to write YAML file for Multifield.
Sample YAML is included in wiki over here: https://github.com/Cognifide/bobcat/wiki/Component-configurer#complex-fields
TabName:
- label: Multifield name
type: MULTIFIELD
value:
- item:
- label: Example Name
type: TEXTFIELD
value: slide1
- item:
- label: Example Name
type: TEXTFIELD
value: slide2
- item:
- label: Example Name
type: TEXTFIELD
value: slide3
@mkrzyzanowski , Thanks for your reply. I have tried and written the YAML File in same way as mentioned above which is as follows:
- label: Carousel List
type: MULTIFIELD
value:
- item:
- label: Image
type: PATHBROWSER
value: http://www.google.com
- item:
- label: Alt Text
type: TEXTFIELD
value: Image Alt Text
- item:
- label: Title
type: TEXTFIELD
value: Title
Once Click on add field , it is opening multifiled dialog with multiple fields.
With the YAML file mentioned above, I am only able to configure first field available after clicking on Add Field. For other fields, it is not able to find other fields and throwing error:
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":".coral-Textfield:not([type='hidden']"}
(Session info: chrome=64.0.3282.119)
(Driver info: chromedriver=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.04 seconds
Can you please help me to understand why 2nd field Alt Text is not being traced as TEXTFIELD.
In your YAML you are trying to configure 3 fields in separate Multifield items, while in fact, you want to do it in a single one (at least from what I see on the screenshot). Try the following config:
- label: Carousel List
type: MULTIFIELD
value:
- item:
- label: Image
type: PATHBROWSER
value: http://www.google.com
- label: Alt Text
type: TEXTFIELD
value: Image Alt Text
- label: Title
type: TEXTFIELD
value: Title
Rinse and repeat for more Multifield items :).
@mkrzyzanowski Hi , Thanks for your reply. I am trying with above config as well but still getting error like:
Tests in error:
no such element: Unable to locate element: {"method":"css selector","selector":".coral-Textfield:not([type='hidden']"}
(Session info: chrome=64.0.3282.167)
(Driver info: chromedriver=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.03 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'MACLTUS49418', ip: 'fe80:0:0:0:c6b3:1ff:fec6:b403%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef), userDataDir=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/.org.chromium.Chromium.5bL3RI}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, version=64.0.3282.167, browserConnectionEnabled=false, nativeEvents=true, webdriver.remote.sessionid=945a16231501bd1542d900079619d220, locationContextEnabled=true, cssSelectorsEnabled=true}]
Session ID: 945a16231501bd1542d900079619d220
The border around your fields might suggest they are grouped together with a fieldset and our selectors are not handling this structure OR that they're not working with your AEM version. It is possible to write a custom TextField
implementation, register it in the FieldsRegistry
and use it in your configuration - please refer to the existing Bobcat sources for more details. In case of further questions, let us know.
Closing for now, please let us know if the issue still persists with AEM 6.4 modules.