Input Box doesnt have ID names - excel

I am trying to create a vba macro that could copy data from excel file to a webpage.
However, the 2 input boxes where I am going to paste data doesn't have ID name.
The 2 input boxes where I need to paste data is just within the same row.
Input Box 1 - Row 3, Col 3
Input Box 2 - Row 3, Col 5.
<input class="JSTextfield" maxlength="29" autocomplete="off" type="text" tabindex="2" style="width: 186px; text-align: left;" originalstring="" prevwidth="186">

Related

for test automating a form , i need to fill out a month and year in form,but the month is only getting filled ,year is not

this html element
<input type="month" class="form-control" aria-describedby="" placeholder="From" id="id_From_Duration1" name="From_Duration1" value="" maxlength="7" onfocus="(this.type='month')" min="1940-01" max="2025-12">
<small class="text-muted"> Format:YYYY-MM</small>
i tried to do this way
self.webdriver.find_element_by_name("From_Duration1").click()
self.webdriver.find_element_by_name(i).send_keys("032019", Keys.ENTER)
there is no day needed ,the form should be filled like this eg. March 2019

Netsuite / Freemarker - splitting item description by line is not working

Anyone who can help why the below code is not working.
This is my code:
<#list item.description?split("\n", 'r') as desc>
<tr>
<td align="left" colspan="23">${desc}</td>
</tr>
</#list>
I am editing an advance PDF/HTML template in Netsuite. I need to split the item description as 1 line per row. I wanted to split them like this because we have a case like for 1 item, there is a super long description and what happens is, instead of printing the items 1,2,3 in continuous flow, the print only displays 1 item in page 1 and the next item is in page 2 even though item 1 only occupied 10% of page 1. for item 2 (with very long description, it did occupy 100% of page 2).
If the code above is working correctly, then item 1 and item 2 should be printed on page 1 and some of the descriptions of item 2 should be on page 2.
I tried changing the code to <#list item.description?split(".") as desc> and it worked.
I found what works. Instead of "\n" or "\n", I use the br tag to split the item.descripiton.
<#list description?split("<br /><br />") as desc>

Turn Web Page address list into CSV File (Table Format)

I have been trying to copy data into excel and format it into a table, as it needs to be imported into a system. The only issue is is that it's formatted web data.
On import the file is completly jumbled, even with dilimiters. I'm not all that excel savy, does anyone know how I can turn this list of addresses into a table I.e.
Deliver To | Street / RD | City / Town | County | Postal | Tel | Fax | Email
1
2
3
4
5
If you right-click on the page and select View Source, each item is listed pretty cleanly in the code. I put all your fields in CAPS.
<li>
<h2>CITY</h2>
<div class="acc-section">
<div class="acc-content">
<p>STREET, DELIVER, CITY, COUNTY. POSTAL</p>
<p>T: <strong>TEL</strong><br /> F: <strong>FAX</strong><br /> E: EMAIL
</p>
</div>
</div>
</li>
Take a bit of time to strip out the markup with some find/replace, or write a fun regular expression to do it. Once you get it down to a list like this:
STREET
DELIVER
CITY
COUNTY
POSTAL
TEL
FAX
EMAIL
You can then write an Excel formula that transposes the data to the format you want ... something that takes the second cell, and then every eighth cell after that for your first column, for example.
Once you have all the data formatted how you want, copy it, and paste as value, to remove the Excel formulas.
But, that's assuming you want a table in Excel. Your title suggests what you really want is a CSV. Once you have the list, it'd be much easier to create a text file with comma separated values (CSV):
STREET,DELIVER,CITY,COUNTY,POSTAL,TEL,FAX,EMAIL,742 Evergreen Terrace,Mr. and Mrs. Homer J. Simpson,Springfield,NT,49007,555-6832,,chunkylover53#aol.com, ....

Bootstrap 3 Layout Issue

I understand how the Bootstrap grid layout works, but I did not see how to handle the rows.
On a medium screen, given rows with col-md-2 there are six columns of data. As I shift to smaller screens I would like a col-sm-3 to show four columns of data, and consequently col-xs-6 to reduce that down to two columns of data on mobile.
The data is pulled from mysql, so each column will be different in length (and thus also height). How am I supposed to handle the row <div class="row">? Since in xs the row will be for two columns, in sm it will be for four columns and in md it will handle six columns?
I tried removing the row completely and things do not line up properly. Any ideas?
Bootstrap handles this exactly the way you want - it will wrap the 'extra' div columns on the smaller devices. So, the term 'row' is a bit misleading in that it might span several horizontal rows if you are on a smaller device.
You can optionally insert a special clear in between the columns if you have varying heights and you want the tops of the next HORIZONTAL row to line up, e.g.:
<div class="clearfix visible-xs-block"></div>
Note that the above would insert a clear ONLY on XS devices since 'visible-xs-block' is included in the class list. If you column elements are the same height, however, this is superflous as the next row will just wraps pleasantly under the previous.
here is a helptile to the the bootstrap documentation example you are looking for:
I've created a Plunkr for discussion: https://plnkr.co/edit/VlnWhSqyKUdbPCKz4IMh?p=preview (resize to see the responsive behavior)
<div class="row">
<div class="col-md-2 col-sm-3 col-xs-6"><b>Col 1: </b>Lorem Ipsum is simply dummy...</div>
<div class="col-md-2 col-sm-3 col-xs-6"><b>Col 2: </b>Lorem Ipsum is simply dummy...</div>
<div class="col-md-2 col-sm-3 col-xs-6"><b>Col 3: </b>Lorem Ipsum is simply dummy...</div>
<div class="col-md-2 col-sm-3 col-xs-6"><b>Col 4: </b>Lorem Ipsum is simply dummy...</div>
<div class="col-md-2 col-sm-3 col-xs-6"><b>Col 5: </b>Lorem Ipsum is simply dummy...</div>
<div class="col-md-2 col-sm-3 col-xs-6"><b>Col 6: </b>Lorem Ipsum is simply dummy...</div>
</div>
I'm not sure, but I think your question is about how to distribute content into different divs. So, in
md: all content in 6 columns
sm: all content in just 4 columns
xs: all content in just 2 columns
Is this the right understanding? If so, it's not possible to achieve this with Bootstrap 3's grid system.

select drop-down list by text not value

I am trying to write an Excel VBA script to navigate to a website and select from a drop-down list using the text in the list item, NOT the value of the index. By examining the HTML code, I can see that the values in the drop-down list appear to be integers with no recognizable pattern and do not appear to correlate to the text shown for the entry in the drop-down list.
<option value="246">new2</option>
<option value="245">new</option>
<option value="196">test</option>
I can successfully use the following command:
ieDoc.getElementById("viewMaintainFixedCombustible_fixedCombustible_fireZoneId").Value = 246
To select the item "new2" from the drop-down list, by sending the value 246. Or, I could send 245 to select "new". However, the elements in the list are always changing, so selecting by value (246, 245, etc.) is impractical. Thus, I am searching for a way to select an entry from the drop-down list (e.g. "new2") by sending the text name of the entry (e.g. "new2") in VBA.
Does anyone have a method for how to do this?
Try below sample code to set dropdown list by text.
Set drp =ieDoc.getElementById("<id of your dropdown>")
For x = 0 To drp.Options.Length - 1
If drp.Options(x).Text = "new2" Then
drp.selectedIndex = x
Exit For
End If
Next

Resources