webpage

Selenium :After launching a website how could we check if the right page is launched

你离开我真会死。 提交于 2019-12-14 02:58:09
问题 In Selenium :After launching a website how could we check if the right page is launched or not. Example: If I want to launch www.google.com ,after running the code how do I check if the same page has been launched. I used, Assert.assertEquals("Correct web page",driver.findElement(By.Xpath("<xpath of one of the element in the page>")).isDisplayed ()); After running the program, I got the below error: Exception in thread "main" java.lang.AssertionError: expected:<Correct web page> but was:<true

Using VBscript to read from an SQL database

北城以北 提交于 2019-12-14 02:42:55
问题 I have an SQL database set up in which I would like to use a vbscript to read from it. Here is the code I am trying to use. SQL_Command_String = "SELECT * FROM Table1 JOIN Table2 WHERE Table1.ID = '5' AND Table2.Date LIKE '2011'" Set Rs = SQLConnection.Execute(SQL_Command_String) DO WHILE NOT Rs.EOF file1="./seminars/"&seminar_type&"/"&seminar_year&"/"&Rs("date")&"-"&Rs("year")&"_"&Rs("last")&".pdf" seminar_year and seminar_type are constants I have initialized and declared to be seminar_year

Web page database query optimization

大兔子大兔子 提交于 2019-12-14 02:28:59
问题 I am putting together a web page which is quite 'expensive' in terms of database hits. I don't want to start optimizing at this stage - though with me trying to hit a deadline, I may end up not optimizing at all. Currently the page requires 18 (that's right eighteen) hits to the db. I am already using joins, and some of the queries are UNIONed to minimize the trips to the db. My local dev machine can handle this (page is not slow) however, I feel if I release this into the wild, the number of

Opening web pages inside a div in asp.net

不问归期 提交于 2019-12-13 22:39:11
问题 I have a requirement of just surfing through the net in my asp application and for that purpose i dropped an iframe. But after that i found that certain sites likes google,fb,youtube etc wont open up in iframe due to security concerns. After some discussions with my colleagues, i thought of a solution of displaying the web page(just like iframe) in a div and then displaying that div in a modal pop up,in which the user can navigate to any pages within that modal pop up But after some initial

Why is Javascript button not working?

回眸只為那壹抹淺笑 提交于 2019-12-13 21:33:52
问题 The effect I am trying to achieve is that when I click a button (called about), one of the div (id=homepage) gets hidden and another div (id=intro_page, which was previously hidden) is made visible. I have the following HTML code: <script type="text/javascript" src='js/index_script.js'></script> . . <input onclick="clicked_about()" type="button" value='About'></input> . . . <div id="homepage"> content </div> <div id="intro_page" style="display: none"> <h1 id="intro_page_caption"> About Me <

JSF validation pattern for input control

烂漫一生 提交于 2019-12-13 20:16:21
问题 I have a JSF page and I have a inputtext in this page. I take the user keywords form this inputtext. My problem is that I want to control the number of keywords that the user enter(they separated by "-" ) and check them to not to be more than a specific number. is there any validation pattern or any better way to check them? 回答1: You can do this validation by using a Custom Validator, by defining a java class implementing Validator interface, which should performs the specific desired

Detect errors on web page with Firebug

心不动则不痛 提交于 2019-12-13 15:13:18
问题 What is the best way to check our web applications for errors such as "duplicate attribute"? My development team tends to use Firefox and Firebug for web development. We've noticed some errors creeping into the codebase, usually duplicate attributes such as: <div id="MyDiv" class="hide" class="interestingDiv"> We see no errors in Firebug's console nor can see anyway to get Firebug to report that there are errors. We have noticed that Firefox itself IS aware of these errors. By clicking on

HTML Theft Prevention

情到浓时终转凉″ 提交于 2019-12-13 08:45:26
问题 I'm working on designing a website, and I want to make sure that no one can steal the code. I would like to prevent the code from being taken out of the website, and display an error message if a user tries to do so. 回答1: HTML Obfuscation is a transformational tool that both preserves the code and prevents it from being reverse-engineered. You can find out more about it here. Here is an example of obfuscated code. This is extremely simple HTML code: <a href="mailto:someone@domain.com">Mail me

Determine how many times webpage has been accessed [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-13 07:56:23
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I was wondering if there is a way to determine how many times a specific webpage has been accessed on the server. If possible, I would like to do this via cPanel, since the website is made in Wordpress, but the page in question I made from scratch and just uploaded it in another

Cannot implement login in GWT

百般思念 提交于 2019-12-13 06:38:30
问题 So, I have followed the tutorial for implementing simple login page over here https://varuntayur.wordpress.com/2012/01/25/session-management-in-gwt/ I tried communicating on the page itself, the author has been very helpful, but up to certain point. The code is pretty long, so I've uploaded it here: http://1drv.ms/1GZQqFV Please be so kind to check it out. The error displayed is the following: [WARN] 404 - POST /atlas_emergency_status_page/LoginService (127.0.0.1) 1405 bytes Request headers