Table view click and scroll each row (Calabash) - calabash

So I am trying to scroll and click each cell on table view. I have one section and 13 rows I use following code
Then /^I Traverse TableView$/ do
each_cell(:animate => true) do |row, sec|
txt = query("tableViewCell indexPath:#{row},#{sec} label", :text).first
touch("tableViewCell index:#{row}")
sleep(STEP_PAUSE)
touch "view marked: 'Recipe Book'" #Back button titled "Receipe Book"
sleep(STEP_PAUSE)
end
end
Problem is it skips rows in between and as a result at the end the "i" is missed matched and throws error.
Any idea how I can fix this intermittent row skips?
-katchdoze

Related

Change rowheight of Apex Interactive grid

In my application I need to set the rows to show the text area columns in more than one line (say 3 lines). However I don't want the text area column contents in one single line, despite the row height is increased. It should be wrapped to the number of lines.
If I turnoff fixed rowheight attribute. Then each row has a different height. Thats not what I'm expecting
I tried below inline css, but it is not changing
#static_id .a-GV-cell {<br/> height: 80px;<br/>}<br/>.wrap-cell {<br/> max-height: 64px;<br/> white-space: normal;<br/> overflow: hidden;<br/>
However this still only shows the text area column contents in one single line, despite the row height is increased.
thanks in advance

Show the row from a search result - Google Sheets

I am trying to make a search function that displays the entire row from matching entries.
This is what currently happens using: =IFERROR(IF(B3="","No Results",ARRAYFORMULA(FILTER(DOCS!C2:C, SEARCH(B3, DOCS!C2:C)))),"No Results")
And this is the column I am trying to show
Example
Data:
Fortnite,Video Game,Epic Games
PUBG,Video Game,IDK
Steam,Service,Valve
Amazon,Service,Amazon
Cats,Species,Animal Kingdom
Search Column B for "Service"
(MY CURRENT RESULTS):
Service
Service
(MY INTENDED RESULTS):
Steam,Service,Valve
Amazon,Service,Amazon
=IF(D1<>"", IFERROR(FILTER(A:A, REGEXMATCH(LOWER(A:A), LOWER(D1))), "No Results"), )
=FILTER(DOCS!A2:G, REGEXMATCH(LOWER(DOCS!C2:C), LOWER(J1)), DOCS!E2:E="active")

Unable to set the Entry box to correct position in python

I am trying to learn creating GUI using Tkinter .I created a window which includes text,Messagebox,Entry widget,labels and Radio buttons.
I used grid method for frames and tried to make entry boxes in row0 and row1 .And a message Box with Some text.But these are not properly aligned even though i gave correct rows and columns but output is not in order.
Entry box is created very far though i mentioned column1 .And message box is created as per the column specified.Can anyone help me how to solve this.If i am missing anything please let me now .
from Tkinter import*
import tkMessageBox
class Example:
def __init__(self,root):
root.title("Sample")
#Entry functions ---------------------------------------
Label(root, text="First Name").grid(row=0)
Label(root, text="Last Name").grid(row=1)
self.e1 = Entry(root)
self.e1.bind("<Return>",self.ShowChoice_radio)
self.e2 = Entry(root)
self.e2.bind("<Return>",self.ShowChoice_radio)
self.e1.grid(row=0,column=1)
self.e2.grid(row =1,column = 1)
#------------------------------------------------------------------------
self.frame=Frame(root)
self.frame.grid(row=3,sticky=W)
self.label=Label(self.frame, text="mine", width=12,bg="green",fg="white",justify=LEFT)
self.label.grid(row=3,column=4,sticky=W,pady=4)
root.minsize(width=666, height=220)
self.v=IntVar()
role=[("ENGLISH",1),("SPANISH",2),("GERMAN",3)]
Label(self.frame,text="Choose your role of target:",justify=LEFT,padx=2,pady=2).grid(row=4,sticky=W)
i=0
for txt,val in role:
i=i+1
self.rad_bt=Radiobutton(self.frame,text=txt,padx=20,variable=self.v,
command=self.ShowChoice_radio,value=val)
self.rad_bt.grid(row=4,column=i+1)
self.bottomframe = Frame(root)
self.bottomframe.grid(row=12,sticky=W)
self.hello(12)
T=Text(self.bottomframe,height=2,width=30)
T.pack(padx=100,side=TOP)
T.insert(END,"just a normal text to display!\n")
self.mbutton=Button(self.bottomframe,text='Quit',command=self.callback,state='normal')
self.mbutton.pack(padx=3,pady=3,side='left')
self.help=Button(self.bottomframe,text='Help',command=self.help_msg,width=5,justify=CENTER)
self.help.pack(padx=93,pady=3,side='left')
def ShowChoice_radio(self):
print self.v.get()
def help_msg(self):
tkMessageBox.showinfo("Help to print ",message="Not yet implemented")
root.minsize(width=666, height=666)
self.show_entry_fields()
self.help.config(state=DISABLED)
def callback(self):
if tkMessageBox.askyesno('verify','Really Quit?'):
root.destroy()
def hello(self,name):
w=Label(root,text="Hello Tkinter!",width=15).grid(row=10)
whatever_you_do = "Whatever . it is my test that \n i can anble to display manner in this case find out whether it is correct one or wrong \n)"
msg=Message(root, anchor='s',width=200,text = whatever_you_do)
msg.config(bg='lightgreen', font=('times', 14, 'italic'))
msg.grid(row=10,column=1,sticky=W)
def show_entry_fields(self):
print "First Name: %s\nLast Name: %s" % (self.e1.get(), self.e2.get())
if __name__=="__main__":
root=Tk()
app=Example(root)
root.mainloop()
Even the quit and Help buttons are not proper...!!!
I initially voted to close this because there is not a clear question, but mostly only a series of statements and opinions, at least one of which is incorrect. After looking more, I think I can answer your implied question "Why is tkinter behaving in a way that seems wrong to me?". The answer, I believe, is that you do not understand that grid coordinates are independent (start over) for each container gridded. Also, coordinates not used are ignored. In particular:
Root has a grid of 5 rows and 2 columns. Renumbering the rows 0, 1, 2, 3, 4 instead of the confusing labeling you used, there is no entry in column 1 for rows 2 and 4. The width of column 0 is determined by the width of self.frame in row 2, column 0. The entry boxes are far to the right because column 0 is very wide.
Self.frame has a grid of 2 rows and 4 columns. The first 3 columns of row 0 are empty. Self.bottomframe is packed instead of gridded. The buttons are to the left of where you want because you packed them to the left. In other words, tkinter did just what you said, which is apparently not what you want.
You might list the result better if you got rid of self.frame, put 'mine' in (2,0) or (2,0), 'Choose...' in (3, 0), and a frame with 3 radio buttoms in (3,1). Then root column 0 would not be so overly wide.

MSChart HowTo Create a Second CursorX to have multiple Cursor by a second Transparant ChartArea?

I am try to introduce a Second CursorX at AxisX Primary if this is possible some how?
I did try to activate a second CursorX at Secondary but that one did not work as expected,
I also readed about Line Annotation and Vertical Line Annotation and created some kind of line but a Second set of CursorX CursorY would be far nicer
I did try to create and as much as empty as possible and Transparant Second ChartArea which i try to overlay on top of the ChartArea1, i noticed InnerPlotPosition and Postion of both ChartArea should stay in track to get a full aligned Overlay, and next the CursorX of second ChartArea should be displayed on top of ChartArea1
This is what i think how it could be done but don't have a clue if it sounda for a good way to create a second CursorX maybe Line Annotation is an easier road to rome
Any help suggestion are welcome
Thanks in advance
Suppose your chart contains multiple chart areas aligned vertically, below code allows you set CursorX in each chart area:
Dim c1 As New Chart
'...here code block to build each chart area ...
'...then use below sample code to align each chart area vertically:
'c1.ChartAreas(i).AlignmentOrientation = AreaAlignmentOrientations.Vertical
'c1.ChartAreas(i).AlignWithChartArea = c1.ChartAreas(0).Name
'below set horizontal cursor (it is a gold vertical bar in each chart area):
For Each area As ChartArea In c1.ChartAreas
area.CursorX.LineColor = Color.Gold
area.CursorX.LineWidth = 3
area.CursorX.IsUserEnabled = True
area.CursorX.IsUserSelectionEnabled = True
area.CursorX.SelectionColor = System.Drawing.Color.PaleGoldenrod
Next

Prawn Adding new line in table

I have the following code to build PDF document with Prawn:
items = [["PERIOD","EMPLOYEE", "EMPLOYEE NAME", "HOURS", "FTES"]]
items += #mandates.each.map do |mandate|
[
mandate[:fte_period_end_date],
mandate[:fte_employee_id],
strname,
mandate[:fte_sum_of_hours],
mandate[:fte_sum_of_ftes],
]
end
#mandates is sorted by fte_employee_id and fte_by period_end_date
I want to insert totals lines per employe for fte_sum_of_hours and fte_sum_of_ftes when pass throw next employee.
What command permits me to insert these lines with Prawn?
Pass them in the array that you are displaying the total from - in Ruby, calculate for each section of elements, the total. Don't do the work in Prawn (it's not Excel).
data = [["product 1: ","$10.00"],["product 2: ", "$20.00"],["Subtotal:","$30.00]]
For example. Then you can format the table with consideration to row 3, the subtotal, with cell styles.