a site i'm going to uses a sniffer to detect that the http unit is neither an IE browswer or Netscape browser. i'm having trouble setting httpunit to trick the site in thinking its IE browsing the site
i tried to do the following:
ClientProperties cp = wc.getClientProperties();
cp.setApplicationName( "Microsoft Internet Explorer" );
cp.setApplicationVersion( "5.5" );
cp.setUserAgent( "Microsoft Internet Explorer 5.5" );
but it's not working
any suggestions would be very much appreciated
thank u
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
a site i'm going to uses a sniffer to detect that the http unit is neither an IE browswer or Netscape browser. i'm having trouble setting httpunit to trick the site in thinking its IE browsing the site
i tried to do the following:
ClientProperties cp = wc.getClientProperties();
cp.setApplicationName( "Microsoft Internet Explorer" );
cp.setApplicationVersion( "5.5" );
cp.setUserAgent( "Microsoft Internet Explorer 5.5" );
but it's not working
any suggestions would be very much appreciated
thank u
nevermind, i found a solution, what i did was:
short nodeType = node.getNodeType();
else if( nodeType == Node.ELEMENT_NODE )
{
if( dataObject.parcelMap.equals( "" ) )
{
String nodeName = node.getNodeName();
if( nodeName.equalsIgnoreCase( "input" ) )
{
NamedNodeMap attrList = node.getAttributes();
int a = attrList.getLength();
Node attrNameNode = attrList.getNamedItem( "name" );
if( attrNameNode != null )
{
String attrNameValue = attrNameNode.getNodeValue().trim();
if( attrNameValue.equalsIgnoreCase( "img" ) )
{
Node attrSrcNode = attrList.getNamedItem( "src" );
String attrSrcValue = attrSrcNode.getNodeValue().trim();
dataObject.parcelMap = "<IMG CLASS=\"imageborder\" SRC=\"http://64.234.218.210" + attrSrcValue + "\" HEIGHT=\"360\" WIDTH=\"488\">";
}
}
}
}
}
Oooops, wrong right solution but for wrong positing, my bad