AEM – Adobe Experience manager, Interview questions and answers - Part 2

1.  How to get padding in AEM testing using Java Selenium?

First, locate the web element and use getCssValue() to retrieve its padding values.

WebElement element = driver.findElement(By.xpath("xpath"));

 

String paddingTop = element.getCssValue("padding-top");

String paddingRight = element.getCssValue("padding-right");

String paddingBottom = element.getCssValue("padding-bottom");

String paddingLeft = element.getCssValue("padding-left");

 

getCssValue() returns the computed CSS value, usually in pixels (e.g., 10px).

 

2.  How to get placeholder in AEM Testing using Java Selenium?

A placeholder is the text displayed inside an empty text box before the user enters a value.

To get the placeholder in AEM testing using Java Selenium, locate the text box element and use getAttribute("placeholder").

WebElement textBox = driver.findElement(By.xpath("xpath"));

String placeholderText = textBox.getAttribute("placeholder");

 


3. How to get the color of a field or object  or  background or text in AEM Testing using Java Selenium?

To get the color of an element, first locate the web element and use getCssValue() to retrieve its CSS color value.

WebElement element = driver.findElement(By.xpath("xpath"));

String color = element.getCssValue("color");

 

To get the background color, use element.getCssValue("background-color").

To get the color of a text, use element.getCssValue("color").

 

4.    How do you validate links in AEM pages?

or How do you validate if any link is broken on the page?

I verify that links point to the correct URLs and return the expected response. Using Java Selenium, I follow these steps:

1.    Get all the links present on the page with anchor tag(tagname(“a”))

2.    Add or store all the links in an arraylist

3.    Get the "href" attributes for all the links

4.    Create instance/object of URL class for each of the href attributes

5.    Create httpURLconnection for each URL

6.    Get status/response code (HTTP status code)

7.    If response code is 400 or above, than consider the link as broken or unsuccessful.


5.  What is dispactcher in AEM ?

The Dispatcher is a caching and load-balancing tool that sits in front of the AEM Publish instance and serves content to users. It improves website performance by caching published pages and reduces the load on the Publish instance.

Normally, a tester do not test the dispatcher and directly test the live page after it is published and went live. But if it is needed in a project then there will be a separate URL to test the dispatcher.

So, the steps would be :

Test author URL in author instance

Test published URL in published instance

Test dispatcher URL to verify cached content, cache invalidation, and relevant headers or cookies.

Test the live URL to verify the website from the end user's perspective.


6.  What is responsive testing in AEM ?

Responsive testing in AEM means testing a webpage on different screen sizes and devices, such as desktops, tablets, and mobile phones, to ensure the layout and functionality meet the requirements.

Example:

    Desktop: Logo | Home | About us| Products | Support | Contact

    Mobile: Logo | ☰

On mobile, the navigation menu may change to a hamburger menu to fit the smaller screen.


7.  What is content fragment in AEM ?

It is a reusable content. It does not include the webpage layout. For example, for an ecommerce website, a content fragment can be created with below information and can be used in different pages or channels. The content remains the same, but the way it is displayed can be different.

Product Name: iPhonexx

Price: $549

Description: iPhone with xyz feature

Brand: Apple

What happens if the information changes?

For example, if the price changes from $799 to $749, you update the Price field in the original Content Fragment.

Difference with the Experience Fragment :

A content fragment is reusable content. It does not include the page layout and design. It focuses on what to display.

An experience fragment is reusable content. It includes the page payout and design or presentation. It focuses on what to display plus how to display.

 

8.  How do you test an AEM workflow?

It depends on the project requirements. However, a typical AEM content approval workflow follows these steps:

Author → Reviewer → Approver/Publisher → Publish

There are usually three roles: Author, Reviewer and Publisher.

Testing Steps:

1.    The Author creates or updates the content and submits it for review.

2.    The Reviewer receives the workflow task.

3.    The Reviewer reviews the content.

4.    If approved, the content moves to the next step for publishing.

5.    If rejected, the content follows the rejection path and returns to the Author for changes.

6.    The Publisher receives the task and publishes the approved content.

Note: If the reviewer rejects the content, then the workflow follows the rejection path, and the content is sent back to the Author for necessary changes and resubmission.

 

A tester will verify:

    - Test as the various roles or users.

    - Each user receives the correct workflow task.

    - Approval and rejection paths work correctly.

    - Only authorized users can perform their assigned actions.

    - Content is published only after the required approvals.

 

9. How would you test an image component in AEM?

An AEM tester will test below features for an image component:

The image formats which are supported and not supported

Upload the image in DAM

Drag and drop the image

Image size/dimensions

Alt text

Broken image

Missing image

Image link, if applicable

Use the image in different browsers

Publish the image

Test in different browsers, devices, screen sizes

 

10. What is a Multifield in AEM?

A Multifield in AEM is a dialog field that allows authors to add multiple values or groups of fields dynamically by clicking an "Add" button.

Instead of displaying all the fields at once, the author can add new fields whenever needed.

A Multifield can contain:

    A single field (e.g., multiple phone numbers).

    A group of fields (e.g., job title, company name, and experience).

 

Example: In a job application form, an applicant can click the "Add Experience" button to add multiple sets of fields to enter their previous job details.

 

11. What are Placeholder, Alt Text, Tooltip, and Label?

1. Placeholder: It is a text displayed inside an empty text box. Once the user starts typing, the placeholder text disappears.

Example: "Enter your username"

 

2. Alt Text: It is alternative text used to describe an image. Screen readers read this text to help visually impaired users understand the image. It may also be displayed if the image fails to load.

Example: "Company Logo"

 

3. Tooltip: It is a short text that provides additional information about a field or element. It usually appears when the user hovers the mouse over the element.

Example: Hovering over a password field displays "Password must contain at least 8 characters."

 

4. Label: It is a text that identifies a field and tells the user what information to enter. It is usually displayed above or beside the input field.

Example: "Username" displayed above or beside the username text box.

 

 


No comments:

Post a Comment