Conversion;
I encountered a problem with my colleagues and found it quite classic. Then I found this article and suddenly realized it.
Think of yourself as depressing. Dumb!
------------------------------------------------------------------
The
The HttpServletRequest class has a setattribute () method, but no Setparameter () method
When GetParameter () is used for client redirection , the linked component obtains request parameters through the GetParameter () method when there is a link
GetText (): Gets the visible inline text for the element.
such as the link in the CSDN home page Home .
Pass
Driver = new Firefoxdriver ();url = "http://www.csdn.net/";Driver.get (URL);Driver.manage (). Timeouts (). implicitlywait (Timeunit.seconds)
Test environment (client browser)
IE6,IE7, IE8 compatibility mode, IE8
Firefox 3.6.8, Google Chrome 5.0.375.125
The standard definitions of two functions are described first.
Elementnode.setattribute (Name,value)
Name required. Specify the name of
The httpservletrequest class includes both the getattribute () method and the getparameter () method. The two methods have the following differences:
(1) The httpservletrequest class has the setattribute () method instead of the setparameter ()
Some books use xml dom, getattribute ("value"), and. value.
. Value also complies with W3C standards and belongs to HTML Dom.
Environment: Firefox 3.5.5 windows
In Firefox, enter the input element manually and use getattribute ("value") to
Excerpted from http://blog.csdn.net/woshixuye/article/details/8027089GetParameter① gets all of the string types. such as xy in http://name.jsp?name=xy② get parameter values passed by Post/get③ used for client redirection, such as clicking a link or
Introduce external objects and PASS Parameters on the webpage. In general, the tags used are iframe and embed (for flash). However, neither of these labels can set parameters like xml, you can only append the query string after the url to pass the
GetAttribute and setattribute can only be used for element nodes.1. When an element node is obtained with getElementById/*---------------------------index.html---------------------------*/shopping listwhat to buy/*------------------------script.js---
When the user does not modify the attributes within the tag via JS, the. getattribute () method does not get the modified value:As in the Input tab, when the user enters the value data through the input box, in the function defined by the onblur.
The problem is not supported for getelementsbyclassname in JavaScript in IE 6/7/8.Then the need to simulate the getelementsbyclassname needs to take the classname attribute, which involves the getattribute problem in JavaScript.In IE 6/7, there is a
(1) Request.getparameter () is obtained through the implementation of the container to obtain the data passed through similar post,get, Request.setattribute () and getattribute () just flow inside the Web container, Only the request processing phase.
Test environment (client browser)IE6,IE7, IE8 compatibility mode, IE8Firefox 3.6.8, Google Chrome 5.0.375.125
The standard definitions of two functions are described first.Elementnode.setattribute (Name,value)Name required. Specify the name of the
The test code is as follows:
Home
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
There are elements A and IMG (standard document mode), and a relative path is set. The browser
GetName
Package Io.appium.android.bootstrap.handler;
Import com.android.uiautomator.core.UiObjectNotFoundException;
Import io.appium.android.bootstrap.*;
Import org.json.JSONException;
/** * This handler was used to get the text of elements. * *
GetAttribute
Most of the introductions only have one, including w3cschool!
In fact, this method has two parameters in iE7!Found on msdn!
Simply flip it
0 is the default condition and is case insensitive!
1 case sensitive 2 returns a string. I didn't
As follows:
Home
There are elements a and IMG (standard document mode), and the relative path is set. The Effects of Various browsers are as follows:
IE6/7: return the complete path
IE8/9/10/Firefox/Safari/Chrome/Opera:
GetParameter① gets all of the string types. such as xy in http://name.jsp?name=xy② get parameter values passed by Post/get③ used for client redirection, such as clicking a link or submitting a button, is used to receive data when using a form or URL
GetAttribute () Usage Brief introduction:This method returns the property value for the specified property name.Syntax structure:Element.getattribute (AttributeName)Parameter resolution: AttributeName: Required to get the property name of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.