|
|
Hi,
I am testing a webpage using selenium. I want to select all the items in a multi-select listbox.
It seems selenium doesn't provide a "select all items" function even though it has an "unselect all items".
I have been unable to use the add_selection function for this purpose.
I write a javascript code to select all the items using eval_script(). I'm using python.
script = """
multiselect = document.getElementsByTagsName("name");
alert(multiselect);
"""
The alert statement above displays that the object is an HTML Collection. Interestingly alert(multiselect.length);
returns "0" even though I'm sure that the list is populated. This makes multiselect.item(2) for example to evaluate to "undefined".
To select all the items I'm simply using:
script = """
for(var k = 0; k < multiselect.length; k++)
{
multiselect.item(2).selected = true;
}
"""
I run the script by simply: sel.eval_script(script) . How do I get around this? Is Javascript the best way? Thanks
|
|
|
|
|
My client and I have both just independently experienced this. Given an HTML page like below, when the IE hack is included, conditionally or not, everything above the "First text" is not visible in the VS designer, in 2008 and 2010, and 2008 crashes very frequently, while 2010 only crashes during certain edit ops on the page.
<title>Smart Computer Solutions</title>
<link href="Styles/Blueprint/screen.css" rel="stylesheet" type="text/css">
<link href="Styles/Blueprint/print.css" rel="stylesheet" type="text/css" media="print">
<!--<span class="code-comment">[if lt IE 8]><link rel="stylesheet" href="Styles/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
</span>
[I cannot paste remaining HTML properly (as code), but it doesn't really matter]
First text
Second text
Third text
|
|
|
|
|
|
I am looking for software (not free stuff) for my daughters boss.
He wants to run his order entry, inventory and sales on a web site so that nobody will need to be in the office. They sell and install fancy telephone systems, so it needs quotes and sales items exploding into its component parts. Currently this is done in excel spreadsheets.
Now I could write this from scratch no problem but he just about fell of his chair when I quoted what custom software would cost him so I thought I would ask what there was out there people would recommend.
|
|
|
|
|
|
Thanks but this is too simplistic for his needs. He actual has the non on line version for his accounting.
He needs to have an inventory system with BOM and serial numbers associated with it that will be used by the order system.
|
|
|
|
|
|
Im new to css, doing a uni assignement and im trying to get a:link, a:hover etc to work.
the code i am currently using is as follows:
#nav
a:link {text-decoration:none;
color: #808080;}
a:visited {text-decoration:none;}
a:hover {text-decoration:underline;}
I want the text to be grey, and not underlined, then when the user hovers over it becomes underlined. However, in firefox the text is blue like a normal link, but the hover over works and becomes underlined.
And in ie the underline does not work and is constantly underlined, but the text is grey. Just wondering what it wrong
Thanks in advanced
|
|
|
|
|
Hello in advanced ( ),
I tried a very simplistic html page with your styles in it and it
functions perfectly within IE 8 and FireFox 3.6.8:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style TYPE="text/css">
a:link
{
text-decoration:none;
color: #808080;
}
a:visited
{
text-decoration:none;
}
a:hover
{
text-decoration:underline;
}
</style>
</head>
<body>
<a href="http://www.google.de">Google</a><br/>
<a id="nav" href="http://intranet.search.siemens.com">Intranet</a><br/>
<a href="http://search.siemens.com">Internet</a><br/>
</body>
</html>
Are you using another version of FireFox?
Best Regards,
Manfred
|
|
|
|
|
Pseudo-tags like link and hover can be tricky to implement, as not all browsers are capable of rendering them. QuirksMode.org[^] is a useful reference in figuring out what browsers support what styles.
In both IE and Firefox, there are browser settings that can partially override link styles. In IE 8, for example, in Internet Options, the Advanced tab, is a setting that tells the browser to underline links either Always, Hover or Never. The eqivalent in Firefox is Options, Content, Colors. You may want to play around with these settings to see if they change the way your page gets rendered. If this is the issue, there's nothing you can do about it other than stealing your user's computer and manually changing the browser settings yourself.
Also, I'm not sure what the #nav is doing there. It is possible that this is being interpreted as "all a:link elements in a block having id="nav" ," which means that the style would not be applied to a:link elements outside of such a block.
|
|
|
|
|
Hi ,
I need help for oracle datatype-
I am using TEMP_STRING VARCHAR2(32767);
but while stroring in it I am building string more than 32767(so exception) ..which is around 40000+
So I used LONG datatype - but still the same.
Will it be appropriate or is there any other one in Oracle ?
Can you please suggest.
Thanks and regards,
- Ajay K
|
|
|
|
|
You may find you get a faster answer if you post this in the correct forum; i.e. DataBase.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
You Can use CLOB. Refer this http://www.codeproject.com/KB/database/C__and_Oracle.aspx
|
|
|
|
|
Oracle Datatypes[^]
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
I am taking a course in programming. They give you practical tests where they actually ask you to write programs for the tests. On one particular test we were asked to make a simple web site that had a user sign up with email and verification and also allowed them to retrieve their password if they forgot it. There also needed to be a login page and an internal page that could be accessed only by those that were logged in as well as an admin page that was only accessible by admins. They failed me on the basis that my database was not in the app_data folder and therefore didn't work right away. No where on the test instructions did it mention anything to do with having to be made in this way and not only that, I contend that the best way to write web apps is to have the database hosted in sql server. It takes a little setup, but it has much more versatility than file based. They contend however that if this was a customer they wouldn't be able to open it and maybe could have bad ramifications. I contend that this is ridiculous since if it was a customer, they wouldn't even own a copy of visual studio rather I would host the web site on my machine for demonstration purposes or if i had a web server i would put it there. I would like to see what people think about this.
|
|
|
|
|
You are right and you are wrong.
You are right in that it is ridiculous to bring a customer experience into a test scenario. You are wrong in that you did not give your customers (the examiners) what they wanted. Stating that the instructions were not explicitly defined in the test is not valid either, you are supposed to think about how the client is going to consume your web site.
And for gods sake will you PLEASE use the enter key and create some paragraphs, I very nearly didn't bother reading this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It sounds like the real test was to make a functional frame work within the alotted time and you missed it.
A customer will often ask for things in a short amount of time it is up to you to make design decisions that allow you to get to your presentation and show your customers they made the right choise in hirering you.
Give them something that works first, specially if the deadline is short. You can always add to the work later or if that is the last deadline, speak with them and point out issues that you have, with using a flat file for example and talk them into upgrading to a database server, at and addition charge (we don't work for free). Then set a deadline for that if they agree, one you are certain you can make.
The first thing you must do with a customer is meet their expectations! Not yours.
All the Best,
Chris J.
BTW - on a side note and as a general rule I have. I never allow for password retrieval, I have security conserns with that. I instead have the password reset using the original email and email confirmation. I would provide a user profile editor that will allow a logged in user to change thier password at any time. When they reset a randome one is set and email to the user when the system gets a confirmation from the user. Of course I explain my concerns to a customer in this issue and if they still want retrieval I will make it.
|
|
|
|
|
This is my drop down list..If i select Others here..i need to dispalya text box..and pass that text box value to a java script variabble
<select id="dept">
<option value="Dept1">Dept1</option>
<option value="Dept2">Dept2</option>
<option value="Dept3">Dept3</option>
<option value="Others">Others</option>
</select>
|
|
|
|
|
If what you want to get is the value attribute then:
function getValue(){
var e = document.getElementById("dept");
var strDept = e.options[e.selectedIndex].value;
}
If you want to get the text of the selected value
function getText(){
var e = document.getElementById("dept");
var strDept= e.options[e.selectedIndex].text;
}
Then you will need to hook the function into the onchange event of your
<select id="dept" onchange="getValue();">...</select>
Greenridge Business Systems
|
|
|
|
|
|
|
|
Your select will need a onchange event to call a javascript function that will test the value of the selected option. If it turns out to be equal to "Others" then you can either, add the need html dynamically or just make it visible by using the css display property.
javascript
function test_selection()
{
var sel = document.getElementById('dept');
var val = sel.options[sel.selectedIndex].value;
if(val=="Others")
{
....you can figure the rest from here.
}
}
html
<select id="dept" onchange="test_selection();">
<option value="Dept1">Dept1</option>
<option value="Dept2">Dept2</option>
<option value="Dept3">Dept3</option>
<option value="Others">Others</option>
</select>
|
|
|
|
|
Thanx a lot..its working..
|
|
|
|