nida333
1
I am using following code
IList allCheckBoxes = driver.FindElementsByXPath("//android.widget.FrameLayout");
foreach (IWebElement webElement in allCheckBoxes) {
Console.WriteLine(webElement.Text.ToString());
}
There is 5 count in allCheckBoxes
but when it prints it print 5 times empty lines
i also tried
Console.WriteLine(webElement.Text);
try :
**webElemen.getAttribute("value")**
instead
hi @igal_epshtein, I tried this one, but it’s returning null
I have the following code:
IList tblCells = (IList) driver.FindElementsByXPath("//XCUIElementTypeApplication[@name='tableAndPicker']/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell");
foreach (IWebElement webElement in tblCells)
{
Console.WriteLine(webElement.GetAttribute("value"));
}
Appium Server logs returns:
[JSONWP Proxy] Got response with status 200: “{\n “value” : null,\n “sessionId” : “7EFB6BBE-B968-45EA-9A75-5AADD5D6595E”,\n “status” : 0\n}”
[MJSONWP] Responding to client with driver.getAttribute() result: null
[HTTP] <-- GET /wd/hub/session/5c783e8a-94f1-485a-8949-7007eed8f1ec/element/F853F5E4-FBA4-4B24-A08E-59220A8B68F9/attribute/value 200 118 ms - 76
[HTTP] --> GET /wd/hub/session/5c783e8a-94f1-485a-8949-7007eed8f1ec/element/47EDF647-F208-479F-AF3A-B59B4345F8B8/attribute/value {}
[MJSONWP] Calling AppiumDriver.getAttribute() with args: [“value”,“47EDF647-F208-479F-AF3A-B59B4345F8B8”,“5c783e8a-94f1-485a-8949-7007eed8f1ec”]
[XCUITest] Executing command ‘getAttribute’
[JSONWP Proxy] Proxying [GET /element/47EDF647-F208-479F-AF3A-B59B4345F8B8/attribute/value] to [GET http://localhost:8100/session/7EFB6BBE-B968-45EA-9A75-5AADD5D6595E/element/47EDF647-F208-479F-AF3A-B59B4345F8B8/attribute/value] with no body
[JSONWP Proxy] Got response with status 200: “{\n “value” : null,\n “sessionId” : “7EFB6BBE-B968-45EA-9A75-5AADD5D6595E”,\n “status” : 0\n}”
[MJSONWP] Responding to client with driver.getAttribute() result: null
[HTTP] <-- GET /wd/hub/session/5c783e8a-94f1-485a-8949-7007eed8f1ec/element/47EDF647-F208-479F-AF3A-B59B4345F8B8/attribute/value 200 120 ms - 76
[HTTP] --> GET /wd/hub/session/5c783e8a-94f1-485a-8949-7007eed8f1ec/element/F3131896-C23A-4A76-B7DA-1A2F6D783133/attribute/value {}
[MJSONWP] Calling AppiumDriver.getAttribute() with args: [“value”,“F3131896-C23A-4A76-B7DA-1A2F6D783133”,“5c783e8a-94f1-485a-8949-7007eed8f1ec”]
[XCUITest] Executing command ‘getAttribute’
[JSONWP Proxy] Proxying [GET /element/F3131896-C23A-4A76-B7DA-1A2F6D783133/attribute/value] to [GET http://localhost:8100/session/7EFB6BBE-B968-45EA-9A75-5AADD5D6595E/element/F3131896-C23A-4A76-B7DA-1A2F6D783133/attribute/value] with no body
[JSONWP Proxy] Got response with status 200: “{\n “value” : null,\n “sessionId” : “7EFB6BBE-B968-45EA-9A75-5AADD5D6595E”,\n “status” : 0\n}”
[MJSONWP] Responding to client with driver.getAttribute() result: null
Even i am facing the same issue, Any solution?