input box not taking any field while it is surrounded in ngrepeat . in browser it is working perfectly but giving error while running in android as web view .
<div ng-repeat="teleOrderDetail in teleOrderDetails">
<table style="text-align:center;font-size:13px;width:98%;height:9%;">
<tr>
<td style="color:grey;width:33.34%;"><input type="tel" name="quantity" ng-model="teleOrderDetail.quantity" class="inputtd"></td>
</tr>
</table>
</div>
input type 'tel' appears to only be supported by Safari. This might be your problem with it displaying properly. Could you perhaps provide a little more information about the error if this isn't the problem?
See here: http://www.w3schools.com/html/html_form_input_types.asp
Related
I have a long table which I want to print it. I need to repeat <th> on beging of every page so I use <thead>:
<table>
<thead>
<tr><th>heading</th></tr>
</thead>
<tfoot>
<tr><td>notes</td></tr>
</tfoot>
<tbody>
<tr><td>x</td></tr>
<tr><td>x</td></tr>
<!-- more rows -->
</tbody>
</table>
I search the web for repeating <thead> on each page and I found this css:
thead { display:table-header-group; }
tfoot { display:table-footer-group; }
so when I click print in firefox, I see the header on each page correctly, but when I open the document in Android and want to print it the header is not shown. Is there any solution or alternative way?
edit: this picture show my problem better:
I'm having trouble getting all the html code under the tags. Here is my current code:
Document document = Jsoup.connect("http://stackoverflow.com/questions/2971155/what-is-the-fastest-way-to-scrape-html-webpage-in-android").get();
Elements desc = document.select("tr");
System.out.println(desc.toString());
It's for that question, and I'm trying to get the text from the question's description. But I'm getting not getting certain tr or td tags like the ones for the question. Here is td tag I'm trying to get:
<td class="postcell">
Under that tag is the actual post. Now when I print out what I'm actually getting, I'm getting a ton of empty td tags and some comments, but not the actual post.
<tr id="comment-37956942" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score"> </td>
<td> </td>
</tr>
</tbody>
</table> </td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">You shouldn't parse HTML with regexes: blog.codinghorror.com/parsing-html-the-cthulhu-way</span> –
﹕ motobói
And it keeps on going with empty td and tr tags. I can't find the actual question. Anyone know why this is happening?
Essentially, I just want the text from the question's post, and I don't know how to get it, so it would be nice if someone could show me how to get the text.
Jsoup is a parser. That means that it can't execute any javascript code, that could generate html. When you encounter this problem the only way to retrieve that content is through a headless browser, that includes a javascript engine. A popular library is selenium webdriver.
In order to determine if the content you are trying to parse is generated in the server (static content) or in the client (dynamic content-javascript generated) you can do the following:
Visit the page you want to parse
Press Ctrl + U
The steps above will open a new tab that contains the content that jsoup receives. If the content you need is not there, then it's generated by javascript.
Follow the steps and search for the content. If it's there, but jsoup still has problems, then most probably the case is that the site considers you a bot or a mobile device. Try setting the userAgent of a desktop browser and see what happens.
Document document = Jsoup.connect("http://stackoverflow.com/questions/2971155/what-is-the-fastest-way-to-scrape-html-webpage-in-android").userAgent("USER_AGENT_HERE").get();
Most importantly, when the site exposes and API for the users to extract information programmatically then it's better to just use that.
Stackoverflow has an API available
I am new to Android Development and on my Android app, I want to retrieve HTML table values from website. I will use the values (in the background) which I'll get from the HTML table.
I want to get (td) values.
HTML table is like this.
<table width="482" height="187" cellspacing="1" cellpadding="1" border="1">
<tbody>
<tr>
<td> </td>
<td colspan="3" style="text-align:center;>
<strong>"UKOME KARARI</strong>
</td>
</tr>
<tr>
<td>Elektronik Bilet</td>
.....
</table>
Can I use the Jsoup? How?
You can use jsoup library inside your android application to achieve HTML table from web site.
Using this libray you can parse html page in Android.
Download jsoup library" from http://jsoup.org/download link.
Happy Coding...
I'm developing a mobile application using phonegap. I have a feature in one of the pages that allows a user to upload or take an image. I'm using input type image/* with capture and it works fine if you open the page on the phone through a web browser but once opened inside the application, it turns into file browser and doesn't allow for camera to take a new photo.
Anyone got any ideas what the problem is?
<table border="0" cellpadding="3" cellspacing="1">
<form enctype="multipart/form-data" action="mob_create.php" method="post">
<tr>
<td width="150">Date:</td></tr><tr>
<td><input type="date" name="inputDate" value="" /> </td>
</tr>
<tr>
<td>Entry:</td></tr><tr>
<td width="300"><input size="34" type="text" name="inputEntry" value="" /></td>
</tr>
<tr>
<td width="150">Add an image (Optional):</td></tr><tr>
<td><input type="file" name="inputPic" accept="image/*" capture ></td></tr>
<tr>
<td><input type="submit" name="submit" /></td>
</tr>
</form>
input type file does not work with androids webview (it works on ios). to get images / videos you have to use the Camera Plugin
Description/Steps:
Using latest android webdriver (selenium-java-2.28.0.zip ) if the screen is invoked (HTML File attached)using the following code:
#######################################3
WebDriver driver = new AndroidDriver();
driver.get("http://10.178.147.244:8080/TestConnected");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.id("test")).sendKeys("Test");
Thread.sleep(10000);
WebElement ele=driver.findElement(By.id("username"));
ele.sendKeys("Test");
#
The text is entered in the first field of the screen but the focus is never moved to the next text box.
In any run the code only acts on any one element on screen .
Even Tried using following:
driver.findElement(By.name("test")).sendKeys(Keys.RETURN);
driver.findElement(By.name("test")).sendKeys(Keys.TAB);
What is the expected output? What do you see instead?
Script should enter values in all the available text boxes on screen.
Selenium version:selenium-java-2.28.0
OS:Android 2.3
Browser:Android Browser
Browser version:HTC Desire Android Browser
WebPage Code:
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="css/mobileAppUI.css"/>
</head>
<body >
<br/>
<div id="wholeBody">
<table align='center' >
<tr id='mdttagtr'>
<td width='30%' class="oraLabel"><script type="text/javascript">document.write(LABELS.mdttag)</script></td>
<td width='70%'>
<input name='test' class="oraInput" type="text" id="mdttag" />
</td>
</tr>
<tr>
<td width='30%' class="oraLabel" id='userLabel'><script type="text/javascript">document.write(LABELS.userId)</script></td>
<td width='70%'>
<input name='username' class="oraInput" type="text" id="username" maxlength="256"/>
</td>
</tr>
</table>
<hr/>
Try to find element by name and then use sendKeys method.it worked for me.
You have entered wrong id for first input element.
driver.findElement(By.id("test")).sendKeys("Test");
//here id mention in your html is "mdttag"
<input name='test' class="oraInput" type="text" id="mdttag" />
To enter text into second text field use selector "by name"