@@ -0,0 +1,3667 @@
+package org.museautomation.selenium.values;%0A%0Aimport org.museautomation.builtins.value.*;%0Aimport org.museautomation.core.*;%0Aimport org.museautomation.core.events.*;%0Aimport org.museautomation.core.resource.*;%0Aimport org.museautomation.core.values.*;%0Aimport org.museautomation.core.values.descriptor.*;%0Aimport org.museautomation.selenium.*;%0Aimport org.openqa.selenium.*;%0A%0A/**%0A * @author Christopher L Merrill (see LICENSE.txt for license details)%0A */%0A@MuseTypeId(%22element-attribute%22)%0A@MuseValueSourceName(%22Element Attribute Value%22)%0A@MuseValueSourceTypeGroup(%22Selenium.Element.Value%22)%0A@MuseValueSourceShortDescription(%22Returns the value of the attribute on the element%22)%0A@MuseValueSourceLongDescription(%22Resolves the supplied element and attributes sources, then returns the attribute value the input element (if any).%22)%0A@MuseStringExpressionSupportImplementation(ElementAttributeValue.StringExpressionSupport.class)%0A@MuseSubsourceDescriptor(displayName = %22Element%22, description = %22The element to get value from%22, name = %22element%22, type = SubsourceDescriptor.Type.Named)%0A@MuseSubsourceDescriptor(displayName = %22Attribute%22, description = %22The name of the attribute to get value from%22, name = ElementAttributeValue.ATTRIBUTE_NAME_PARAM, type = SubsourceDescriptor.Type.Named)%0A@SuppressWarnings(%22unused%22)  // instantiated via reflection%0Apublic class ElementAttributeValue extends BaseElementValueSource%0A    %7B%0A    @SuppressWarnings(%22unused%22)  // used via reflection%0A    public ElementAttributeValue(ValueSourceConfiguration config, MuseProject project) throws MuseInstantiationException%0A        %7B%0A        super(config, project);%0A        _attribute_name_source = getValueSource(config, ATTRIBUTE_NAME_PARAM, true, getProject());%0A        %7D%0A%0A    protected MuseValueSource findElementSource(ValueSourceConfiguration config, MuseProject project) throws MuseInstantiationException%0A        %7B%0A        return getValueSource(config, ELEMENT_PARAM, true, getProject());%0A        %7D%0A%0A    @Override%0A    public String resolveValue(MuseExecutionContext context) throws ValueSourceResolutionError%0A        %7B%0A        WebElement element = resolveElementSource(context, true);%0A        String name = getValue(_attribute_name_source, context, false, String.class);%0A        String value = element.getAttribute(name);%0A        context.raiseEvent(ValueSourceResolvedEventType.create(getDescription(), value));%0A        return value;%0A        %7D%0A%0A    @Override%0A    public String getDescription()%0A        %7B%0A        return String.format(%22elementAttribute(%25s,%25s)%22, getElementSource().getDescription(), _attribute_name_source.getDescription());%0A        %7D%0A%0A    private MuseValueSource _attribute_name_source;%0A%0A    public final static String TYPE_ID = ElementAttributeValue.class.getAnnotation(MuseTypeId.class).value();%0A    public final static String ELEMENT_PARAM = %22element%22;%0A    final static String ATTRIBUTE_NAME_PARAM = %22attribute-name%22;%0A%0A    public static class StringExpressionSupport extends BaseArgumentedValueSourceStringSupport%0A        %7B%0A        @Override%0A        public String getName()%0A            %7B%0A            return %22elementAttribute%22;%0A            %7D%0A%0A        @Override%0A        protected boolean storeArgumentsNamed()%0A            %7B%0A            return true;%0A            %7D%0A%0A        @Override%0A        protected String%5B%5D getArgumentNames()%0A            %7B%0A            return new String%5B%5D %7BELEMENT_PARAM, ATTRIBUTE_NAME_PARAM%7D;%0A            %7D%0A%0A        @Override%0A        protected int getNumberArguments()%0A            %7B%0A            return 2;%0A            %7D%0A%0A        @Override%0A        protected String getTypeId()%0A            %7B%0A            return ElementAttributeValue.TYPE_ID;%0A            %7D%0A        %7D%0A    %7D%0A

Add WithinElement step, which allows executing locators within the children of the specified element.