How to check visibility of object using qtp [duplicate] - html

This question already has an answer here:
How do I handle object existence with QTP?
(1 answer)
Closed 9 years ago.
i have a requirement to verify that for a selected value in a drop down list in a webpage, one text box in the same page gets invisible or not. But when i checked the run time properties (disabled and invisible) of the textbox, in both cases i.e. when visible in the page and when not visible in the page.. both the properties are coming out to be same in both cases. What else i can do to verify the same. I am using qtp 11.0

You could try using readonly property of text field.
Thanks.

Related

How can I access the value inside an HTML span? [duplicate]

This question already has answers here:
Access 'data-' attribute without jQuery
(5 answers)
jQuery: get data attribute
(5 answers)
Closed 5 years ago.
There's this pack simulator on a website I frequent. You are randomly given 10 basketball players in the game with various values on how much they are worth. When you load the page, the cards are face down so you have to click on each one to "reveal" the card and add to your total. The idea is to maximize the value of each pack.
I figured out that the flipping is all show and the total pack score is actually there as soon as you load the page. So I'm trying to write a greasemonkey script to refresh the page until the value is above a certain threshold. I can get to the span with this code:
document.getElementsByClassName("pack-score")[0];
which gets me a span that looks like this:
<span class="pack-score" data-score="12352">
So how would I access the data-score value inside that span, so I can then use it as a value for the code logic?
document.getElementsByClassName("pack-score")[0].getAttribute('data-score')
or in jquery
$(".pack-score").find('span').data('score')

How to have your mouse point at one point when you load a webpage? [duplicate]

This question already has answers here:
Move mouse cursor using javascript in Chrome or Firefox using any method (Plugin, GreaseMonkey?)
(3 answers)
Closed 8 years ago.
So I am making a hover game for my webpage. I just want my mouse to automatically point at a point say a button or a box i create with css when that page loads.
is there any way to do this?
No. There's no way for a web page to control the position of the mouse cursor.

How to change font size in iOS Picker Wheel [duplicate]

This question already has answers here:
Styling <select> tag for iPhone
(4 answers)
Closed 3 years ago.
I am writing a webpage and sometimes the "picker" wheel on select elements scales the font down so that it can all be read and sometimes it just puts the "..." in the text to shorten it but leaves the size of the font untouched.
Is there a way to specify which method is used? I would like the font size to be scaled appropriately.
Thanks!
You use the picker data source method that returns a view, not a string. In the view you put a label, and set the font options as you want there:
– pickerView:viewForRow:forComponent:reusingView:

Event that fires if the user does not allow using the location [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
google map - user choses not to allow location
I need to capture if the user does NOT allow the browser to grab thier location, and use a default set of corridinates to center the map.
How would I do this?
thank you
gMap.setZoom(5);
gMap.setCenter(new google.maps.LatLng(44.44, -88.88));
gMap being your map. Above is how you center the map. I am guessing you have a flow that determines if they allow the browser to grab their location. At that point is where you would set the center. Can't grasp much of what you are doing from what you currently have.

Can I change the blinking caret in a form/text area in a browser? [duplicate]

This question already has answers here:
How to use square cursor in a HTML input field?
(6 answers)
Closed 6 years ago.
I want to have a custom text caret in my text field for my web page. I would like to have an old school block type blinking caret. Is this possible?
The simple answer is you can't (change the user's blinking caret) via javascript, html, or css as that is created and managed by the chrome (the browser beyond the DOM)
Wanna fake it?
http://www.dynamicdrive.com/forums/showthread.php?t=17450
The code examples shown are pretty old, but the idea remains the same-- Make a blinking box and have it tail the input...
With thats all said, I highly suggest against using it in anything but the smallest, niche, 'for fun' way as having a javascript function fire and be altering the DOM on every keyDown is bordering on user abuse imho.