• shanmukh prasad
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
We are trying to automate regression testing using Selenium web driver. Issue we are facing is that element Ids are getting randomly generated and Selenium is not able to identify elements.
We have tried putting unique Ids using aura:id for such elements but still these Ids are not coming up in console.
Classes are getting generated randomly.
XPATH is also not working.
HI ,I am doing a trailhead on salesforce Lighting this is my code 

<aura:component >
    <aura:attribute name="item"  type="Camping_Item__c"  /> <!-- required="true" type="String"  -->
    <p> The Item is <ui:outputText value ="{!v.item}"></ui:outputText></p>
    <p>Name:
        <ui:outputText value="{!v.item.name}" /> 
    </p>

    <p>Quantity:
        <ui:outputNumber value="{!v.item.Quantity__c}" /> 
    </p>

    <p>Price:
        <ui:outputCurrency value="{!v.item.Price__c}" /> 
    </p>

    <p>Packed?:
        <ui:outputCheckbox value="{!v.item.Packed__c}" /> 
    </p>
    
    <p><ui:button label="Packed!" press="{!c.packItem}"></ui:button>
    </p>
</aura:component>



Now Its required of me to :
Add a button to the campingListItem component that when clicked, marks the item as packed.
1.Add a button labeled "Packed!" that calls the packItem controller function when clicked.
2.The controller action marks the item attribute as packed and disables the button.

I have done with the first point
I'm struggling with the second point.

the controller code looks something like this (which currently isnt working)

({
    packItem : function(component, event, helper) {
        var btn= event.getSource();
        var BtnMessage =btn.get("v.label");  
        component.set("v.item","Packed");          
        btn.disabled=false;
    }
})



each time I have failing the trailhead because of this error message
Challenge Not yet complete... here's what's wrong: 
The campingListItem JavaScript controller isn't setting the 'Packed' value correctly.



 
Hi, I am having trouble with the "Attributes and Expressions" module from trailhead.

Here is the challenge:
Create a Lightning Component to display a single item for your packing list.
  • Create a component called campingListItem that displays the name (ui:outputText) and the three custom fields using the appropriate output components.
  • Add an attribute named 'item' for type Camping_Item__c.
I created an component named campingListItem and this is the code:
<aura:component >
    <aura:attribute name="item" type="<my_domain>__Camping_Item__c"/>
    
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.<my_domain>__Packed__c}"/>
    <ui:outputCurrency  value="{!v.item.<my_domain>__Price__c}"/>
    <ui:outputNumber value="{!v.item.<my_domain>__Quantity__c}"/>
</aura:component>

The error that I am getting is: "Challenge Not yet complete... here's what's wrong: 
The packingListItem Lightning Component's attribute tag doesn't exist or its attributes are not set correctly."

With this, I tried to create another component, with the name "packingListItem", but It didn't work.

Can anyone help me?

Thanks,

Hi,

I get that error when I try to save this code.

trigger ExampleTrigger2 on Contact (after insert, after delete) {
    if (Trigger.isInsert) {
        Integer recordCount = Trigger.New.size();
        // Call a utility method from another class
        EmailManager.sendMail('aschor@acmeunited.com', 'Trailhead Trigger Tutorial', 
                    recordCount + ' contact(s) were inserted.');
    }
    else if (Trigger.isDelete) {
        // Process after delete
    }
}

thanks,
 

Aron