All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.neotys.neoload.model.readers.loadrunner.method.WebcustomrequestMethod Maven / Gradle / Ivy

package com.neotys.neoload.model.readers.loadrunner.method;

import java.util.Collections;
import java.util.List;

import com.google.common.collect.ImmutableList;
import com.neotys.neoload.model.core.Element;
import com.neotys.neoload.model.parsers.CPP14Parser.MethodcallContext;
import com.neotys.neoload.model.readers.loadrunner.LoadRunnerVUVisitor;
import com.neotys.neoload.model.readers.loadrunner.MethodCall;
import com.neotys.neoload.model.readers.loadrunner.WebCustomRequest;
import com.neotys.neoload.model.repository.Page;

public class WebcustomrequestMethod  implements LoadRunnerMethod {
	
	public WebcustomrequestMethod() {
		super();
	}

	@Override
	public List getElement(final LoadRunnerVUVisitor visitor, final MethodCall method, final MethodcallContext ctx) {		
		final Page page = WebCustomRequest.toElement(visitor, method, ctx);
		if(page == null){
			return Collections.emptyList();
		}
		visitor.getCurrentExtractors().clear();
		visitor.getCurrentValidators().clear();
		visitor.getCurrentHeaders().clear();
		visitor.setCurrentRequestFromPage(page);
		return ImmutableList.of(page);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy