[richfaces-planning-issues] [JBoss JIRA] Commented: (RFPL-493) richfaces-selenium - implement guards for http/xhr/no request types

Lukas Fryc (JIRA) jira-events at lists.jboss.org
Tue Apr 6 11:57:38 EDT 2010


    [ https://jira.jboss.org/jira/browse/RFPL-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12524079#action_12524079 ] 

Lukas Fryc commented on RFPL-493:
---------------------------------

Code snippet for overriden XMLHttpRequest#send method (working in Firefox and Chrome):

var formerSend = XMLHttpRequest.prototype.send;

function newSend(arg) {
	alert("Arg: '" + arg + "'");
	formerSend.call(this, arg);
}

XMLHttpRequest.prototype.send = newSend;

var xhr = new XMLHttpRequest();

xhr.open("GET", "http://localhost:8080/myproject/faces/index.xhtml", true);
xhr.send("");

> richfaces-selenium - implement guards for http/xhr/no request types
> -------------------------------------------------------------------
>
>                 Key: RFPL-493
>                 URL: https://jira.jboss.org/jira/browse/RFPL-493
>             Project: RichFaces Planning
>          Issue Type: Sub-task
>          Components: QA
>            Reporter: Lukas Fryc
>            Assignee: Lukas Fryc
>             Fix For: 4.0.0.ALPHA2
>
>
> Task desc in following email:
> Hi,
> I'm trying to implement to our richfaces-selenium library new requirement:
> guarding what type of request will be actually done when triggering action like selenium.{click,fireEvent,type,...}.
> I identified 3 types of request used in LiveDemo:
> - XHR request
> - regular HTTP request
> - no request
> Advice needed in following:
> a) Is following access to guard XHR/HTTP requests right?
> - set the global variable like _richfaces_selenium_guard_xhr = true;
> - if it will equal undefined after triggering action, HTTP request was done, otherwise it was XHR (or no request!)
> b) how to guard that no request will be done (client-side actions) and distinguish such request from XHR?
> c) how to call regular HTTP request in API? Proposal:
> guardAjaxRequest(selenium).click(...) - XHR
> guardHttpRequest(selenium).click(...) - regular HTTP (no XHR)
> guardNoRequest(selenium).click(...) - no request 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-planning-issues mailing list