Remove name strategy from documentation
* Remove reference to 'name' locator strategy
(https://github.com/appium/appium/issues/7541)
* Remove references to 'name' strategy
MODIFY
docs/cn/writing-running-appium/appium-bindings.cn.md
docs/cn/writing-running-appium/appium-bindings.cn.md
@@ -746,7 +746,7 @@ NSError *err;
```ruby
# ruby
touch_action = Appium::TouchAction.new
-element = find_element :name, 'Buttons, Various uses of UIButton'
+element = find_element :accessibility_id, 'Buttons, Various uses of UIButton'
touch_action.press(element: element, x: 10, y: 10).perform
```
@@ -980,7 +980,7 @@ driver.Zoom(100, 200);
```ruby
# ruby
-element = find_element :name, 'Element Name'
+element = find_element :accessibility_id, 'Element ID'
execute_script "mobile: scrollTo", :element => element.ref
```
@@ -991,7 +991,7 @@ todo: python
```java
// java
-WebElement element = driver.findElement(By.name("Element Name"));
+WebElement element = driver.findElementByAccessibilityId("Element ID");
HashMap<String, String> arguments = new HashMap<String, String>();
arguments.put("element", element.getId());
(JavascriptExecutor)driver.executeScript("mobile: scrollTo", arguments);
@@ -999,7 +999,7 @@ arguments.put("element", element.getId());
```javascript
// javascript
-return driver.elementByName().then(function (el) {
+return driver.elementByAccessibilityId().then(function (el) {
return driver.execute('mobile: scrollTo', {element: el.value});
});
```

MODIFY
docs/en/writing-running-appium/appium-bindings.md
docs/en/writing-running-appium/appium-bindings.md
@@ -753,7 +753,7 @@ expanded upon soon.
```ruby
# ruby
touch_action = Appium::TouchAction.new
-element = find_element :name, 'Buttons, Various uses of UIButton'
+element = find_element :accessibility_id, 'Buttons, Various uses of UIButton'
touch_action.press(element: element, x: 10, y: 10).perform
```
@@ -987,7 +987,7 @@ Scroll to an element.
```ruby
# ruby
-element = find_element :name, "Element Name"
+element = find_element :accessibility_id, "Element ID"
execute_script "mobile: scroll", direction: "down", element: element.ref
```
@@ -1007,7 +1007,7 @@ js.executeScript("mobile: scroll", scrollObject);
```javascript
// javascript
-return driver.elementByName().then(function (el) {
+return driver.elementByAccessibilityId().then(function (el) {
driver.execute("mobile: scroll", [{direction: "down", element: el.value}]);
});
```

Remove name strategy from documentation (#8230)

* Remove reference to 'name' locator strategy

(https://github.com/appium/appium/issues/7541)

* Remove references to 'name' strategy