2gis / Winium.Desktop

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.
Mozilla Public License 2.0
404 stars 140 forks source link

Get table data using Winium #61

Open SandeepSagarK opened 9 years ago

SandeepSagarK commented 9 years ago

img Hi,

I am using UIspy to find the elements in Windows, While automation a tool where I have table in it where UIspy is identifying only table 'Class Name'

Please find attachment for table

ClassName: "NewGrid_t"

table = driver.find_elements_by_class_name("NewGrid_t") print (table)

result : selenium.webdriver.remote.webelement.WebElement object at 0x00000000033AC278

for tab in table: print(tab.text)

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Winium\Winium_SAM\Shore_Agent_Manager.py", line 65, in print(tab.text) img

Thanks, Sandeep S K.

skyline-gleb commented 8 years ago

@SandeepSagarK Hi! Sorry to take so long. May I help you now?

SandeepSagarK commented 8 years ago

I am glad to see your response. Thank you

skyline-gleb commented 8 years ago

do you have anymore questions?

SandeepSagarK commented 8 years ago

same question .. this issue haven't solved yet

skyline-gleb commented 8 years ago

Please give more info about error - full output, traceback etc

MsScribe commented 7 years ago

The answer is found? How to refer to the table?

vijayanandar commented 6 years ago

public void stck() { int count = 0; double totval = 0.0; try { for (int i = 7; i <= 241; i = i + 9) { WebElement w1;

            w1 = driver.findElement(By.xpath("(//*[@LocalizedControlType='item'])[" + i + "]"));

// if (i == 7) { // w1.click(); // } w1.click(); String val = w1.getAttribute("Name"); System.out.println(val); double dd = Double.parseDouble(val); count++; // totval=totval+dd; // System.out.println(totval); // screen.type(Key.DOWN);public void stck() { int count = 0; double totval = 0.0; try { for (int i = 7; i <= 241; i = i + 9) { WebElement w1;

            w1 = driver.findElement(By.xpath("(//*[@LocalizedControlType='item'])[" + i + "]"));

// if (i == 7) { // w1.click(); // } w1.click(); String val = w1.getAttribute("Name"); System.out.println(val); double dd = Double.parseDouble(val); count++; // totval=totval+dd; // System.out.println(totval); // screen.type(Key.DOWN);

skptricks commented 4 years ago

How to click button present inside the excel sheet using winium driver ?

Purushotham230 commented 3 years ago

data table no vales Hi, I'm working on the desktop app, where data has no values at all, just referring the data table , table data is unable to find, I guess they didn't give the table properties. please find the attachment.

I cannot ask the developer to implement it since we are not developing it. Could you please let me know how can i use grid items-get text from any cell, click on any row if it's not implemented by the developer?

Can anyone suggests or any alternate solution, if know, Please let me know. Thanks in advance.