Ask a Question

Detailed Question About Formatting

SOLVED
MarkSchofer
Frequent Contributor

Detailed Question About Formatting

I have a python Script that reads from a spreadsheet

Long Story Short

It Reads Payee, PayDate and Payment Amount

def LookForCash():
# Checking the 'Cash Recipt Links' activity
# Log.Message("Drill Down","",pmNormal, attr)
browser = Aliases.browser
page = browser.Page("*")
PropArray = ["ObjectType","ObjectLabel"]
ValuesArray = ["Link","$4,077.94"]; -Hard Coded right now (and it works) I will be passing a variable within a loop
#browser = Aliases.browser
#page = browser.Page("*")
page.FindChild(PropArray, ValuesArray,10).click()
currentPage = browser.Page("*")
currentPage.Wait()
Log.Message(currentPage)

I formatted the spreadsheet and look like the Object Label and of course it only takes the unformatted value.   

IDEALLY IF I COULD extract the formatted value I would be pretty much done

Can I AQstring the ValuesArray here? Is there a better way?  

1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: Detailed Question About Formatting

Can I AQstring the ValuesArray here? 

Probably, since the value is a string.  Try it and see.

 

Is there a better way? 

I never got into using tables, although I know some here do.  I'd be reading straight from the spreadsheet or an equivalent .csv file.

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

5 REPLIES 5
Marsha_R
Community Hero

Re: Detailed Question About Formatting

Can I AQstring the ValuesArray here? 

Probably, since the value is a string.  Try it and see.

 

Is there a better way? 

I never got into using tables, although I know some here do.  I'd be reading straight from the spreadsheet or an equivalent .csv file.

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

MarkSchofer
Frequent Contributor

Re: Detailed Question About Formatting

The spreadsheet part I have down fine.   I read the vales from the spreadsheet and then compare them the values on a web page. It is the conversion from the spreadsheet to the web page. The webpage (link) have commas and dollar signs and that is where the compare breaks down. But I had a brain storm while typing this (THANK YOU) and as you said I will heed your suggestion 

 

Thank you for your thoughtful response

Marsha_R
Community Hero

Re: Detailed Question About Formatting

Happy to trigger brain storms any time.  🌩


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
MarkSchofer
Frequent Contributor

Re: Detailed Question About Formatting

That is what this job is all about. Me a non Python programmer figuring stuff out on the fly. Its nice to actually get some human feedback.
Happy Friday 13th

MarkSchofer
Frequent Contributor

Re: Detailed Question About Formatting

wow worked first try PropArray = ["ObjectType","ObjectLabel"] ValuesArray = ["Link",aqConvert.CurrencyToFormatStr(4077.94,2,False,False,True)];
cancel
Showing results for 
Search instead for 
Did you mean: