Search Results

Search found 1636 results on 66 pages for 'rc'.

Page 10/66 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How to use javascript-xpath

    - by Nirmal Patel
    I am using Selenium RC with IE 6 and XPath locators are terribly slow. So I am trying to see if javascript-xpath actually speeds up things. But could not find enough/clear documentation on how to use native x- path libraries. I am doing the following: protected void startSelenium (String testServer, String appName, String testInBrowser){ selenium = new DefaultSelenium("localhost", 4444, "*" +testInBrowser, testServer+ "/"+ appName + "/"); echo("selenium instance created:"+selenium.getClass()); selenium.start(); echo("selenium instance started..." + testServer + "/" + appName +"/"); selenium.runScript("lib/javascript-xpath-latest-cmp.js"); selenium.useXpathLibrary("javascript-xpath"); selenium.allowNativeXpath("true"); } This results in speed improvement of XPath locator but the improvements are not consistent. On some runs the time taken for a locator is halved; while sometimes its randomly high. Am I missing any configuration step here? Would be great if someone who has had success with this could share their views and approach. Thanks, Nirmal

    Read the article

  • Take screenshot with Selenium: WaitForPageToLoad does not wait long enough

    - by OregonGhost
    I'm trying to get screenshots from a web page with multiple browsers. Just experimenting with Selenium RC, I wrote code like this: var sel = new DefaultSelenium(server, 4444, target, url); sel.Start(); sel.Open(url); sel.WaitForPageToLoad("30000"); var imageString = sel.CaptureScreenshotToString(); This basically works, but in most cases the screenshot is of a blank browser window, because the page is not yet ready for display. It kind of works if I add a sleep just after the WaitForPageToLoad, but that slows down the fast browsers and/or may be to short for the slower browsers (or under load). A typical solution for this seems to be to wait for the presence of a certain element. However, this is meant as a simple generic solution to get a screenshot of a local web page with as many browsers as possible (to test the layout) and I don't want to have to enter certain element names or whatever. It's a simple tool where you just enter the Selenium Server URL and the URL you want to test, and get the screenshots back. Any advice?

    Read the article

  • Open a URL with parameters using selenium.open()

    - by gagneet
    I am using selenium.open(), to open a URL, which prints the cookie output to the browser window: String cookiestr = "http://my.server.com/cookie?out=text"; selenium.open( cookiestr ); The problem is that, it opens a "Save As..." popup, to save the file named "cookie". When I open the same URL in my browser directly, it displays text in the browser window. I want to capture the body text shown, when I open the URL, but am unable to do so. Is there any other command available which I can use to do this? BufferedWriter outputfile = null; String bodytext = selenium.getBodyText(); System.out.println("Body Text :" + bodytext); Integer I = new Integer(i); filename = "C:\\cookies\\" + I.toString() + ".txt"; outputfile = new BufferedWriter(new FileWriter( filename )); outputfile.write( bodytext ); outputfile.newLine(); i++;

    Read the article

  • Weird - "The EntityReference object could not be serialized" when serializing from an ASP.NET Web Si

    - by Mikey Cee
    I have an Entity Framework data model. Part of the model is a Customer entity. The web service provides a method to get a customer, and to receive an updated version of this customer to be persisted. To test this, I created a new ASP.NET web Application, (Solution Add New Project ASP.NET Web Application), then added a reference to my service reference using the standard Add Service Reference dialog. I then call the service using the following code: var client = new CustomerServiceClient(); var customer = client.GetCustomerByID(18); // get it customer.LimitDown = 100; // change it client.SaveCustomer(customer); // persist it Everything works as expected. Now, I do exactly the same thing, but this time with as ASP.NET Web Site (Solution Add New Web Site ASP.NET Web Site). I add the reference in a similar fashion and copy and paste the code above into the new site. But now I get the following exception thrown on the 4th line: System.InvalidOperationException The EntityReference object could not be serialized. This type of object cannot be serialized when the RelationshipManager belongs to an entity object that does not implement IEntityWithRelationships. Source Error: Line 2474: Line 2475: public SkyWalkerCustomerService.OperationResult SaveCustomer(SkyWalkerCustomerService.Customer customer) { Line 2476: return base.Channel.SaveCustomer(customer); Line 2477: } Line 2478: } Stack Trace: System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +9475203 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +345 SkyWalkerCustomerService.ICustomerService.SaveCustomer(Customer customer) +0 SkyWalkerCustomerService.CustomerServiceClient.SaveCustomer(Customer customer) in c:\Windows\Microsoft.NET\Framework\v4.0.30128\Temporary ASP.NET Files\testsite2\dd2bcf8d\f95604ff\App_WebReferences.fz4h7x7l.0.cs:2476 _Default.Page_Load(Object sender, EventArgs e) in c:\Users\Mike\Documents\Repositories\UWC\SkyWalker\TestSite2\Default.aspx.cs:17 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +61 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1966 Googling for this error returns very little. Why doesn't this work?

    Read the article

  • Selenium screenshots using rspec

    - by Thomas Albright
    I am trying to capture screenshots on test failure using selenium-client and rspec. I run this command: $ spec my_spec.rb \ --require 'rubygems,selenium/rspec/reporting/selenium_test_report_formatter' \ --format=Selenium::RSpec::SeleniumTestReportFormatter:./report.html It creates the report correctly when everything passes, since no screenshots are required. However, when the test fails, I get this message, and the report has blank screenshots: WARNING: Could not capture HTML snapshot: execution expired WARNING: Could not capture page screenshot: execution expired WARNING: Could not capture system screenshot: execution expired Problem while capturing system stateexecution expired What is causing this 'execution expired' error? Am I missing something important in my spec? Here is the code for my_spec.rb: require 'rubygems' gem "rspec", "=1.2.8" gem "selenium-client" require "selenium/client" require "selenium/rspec/spec_helper" describe "Databases" do attr_reader :selenium_driver alias :page :selenium_driver before(:all) do @selenium_driver = Selenium::Client::Driver.new \ :host => "192.168.0.10", :port => 4444, :browser => "*firefox", :url => "http://192.168.0.11/", :timeout_in_seconds => 10 end before(:each) do @selenium_driver.start_new_browser_session end # The system capture need to happen BEFORE closing the Selenium session append_after(:each) do @selenium_driver.close_current_browser_session end it "backed up" do page.open "/SQLDBDetails.aspx page.click "btnBackup", :wait_for => :page page.text?("Pending Backup").should be_true end end

    Read the article

  • Visual studio 2010 and Sql Server

    - by Mendy
    Do visual studio 2010 include already Sql Server instance, or I need to install Sql Server developer edition to develop an application that need a Sql Server db. If it installs a Sql Server express edition, it this enough or it's better to have Sql Server developer edition?

    Read the article

  • [Selenium] Don't stop on HTTP error 403

    - by Sebi
    In one of my Selenium test cases, I try to ensure that certain pages can't be accessed. Instead, HTTP return code 403 should be given. However, here Selenium terminates test execution with the following exception: com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://user:[email protected]/admin Response_Code = 403 Error_Message = Forbidden Any way to work around that?

    Read the article

  • Running Visual Studio 2005, 2008, and 2010 on same system.

    - by thelsdj
    I have around 50 projects in Visual Studio 2005 that I am building a new development machine for and I'd like to slowly move those projects to VS 2008 but also have 2010 available for select new projects. Can this work? Are there any gotchas for this sort of setup? Any general advice for running multiple versions of Visual Studio on the same system would be greatly appreciated. Specifically related to managing a controlled migration of projects to new versions but being able to selectively keep some on old versions.

    Read the article

  • How to select TreePanel node(Parent/child) in selenium java

    - by sai kumar
    My Application having TreePanel Element and I have to select the root node at the begining to add child node underit. When I try to click on root node using its XPATH String locator = "//div[@id='resultPropertyTree']/div/table/tbody/tr/td"; selenium.clickAt(locator,"0,1"); The entire element is going invisible hence script throwing debug exception saying the element is invisible/not got the focus etc. Can anybody help me out on handling above is appreciated. Regards Sai

    Read the article

  • How to use browser options in selenium?

    - by Guru1985
    I have a browser which takes certain parameters as options as shown below. testbrowser.exe -id=test -url=http://www.google.com/. Below is my selenium code. selenium = new DefaultSelenium("localhost", 4444, "*custom "+testBrowser+" -id=test -url=", "http://www.google.com/"); selenium.start(); selenium.open("http://www.yahoo.com"); When i execute this i am getting the below error. java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:103) I think the problem is with options that my browser requires as the same code works fine with firefox or IE. Please help me in solving this options issue. Thanks in Advance Gururaj R

    Read the article

  • Native Mouse events with Flash and Selenium

    - by Dan at Demand
    I understand that Selenium does not support Flash, but it is my understanding that I should be able to do some simplistic testing of Flash by using Selenium's built in native mouse support and doing mouse up/down events based on coordinates. Is this correct? I can't seem to get it working. I'm trying to test on this page: http://mandy-mania.blogspot.com/2010/04/sneak-peek-of-final-season-of-lost-dvd.html and all I'm trying to do is click on the flash object so it plays the video. I've tried all sorts of commands, MouseOver, MouseDown, MouseDownAt, MouseUp, MouseUpAt, etc. So, I'm wondering if this just theoretically doesn't work or if I'm just doing something wrong. The xpath I'm using is //object[@id='player'], although I've tried a number of different combinations. And yes, I've also tried just the straight click command. Any suggestions? Thanks!

    Read the article

  • Is there any way to delete an HttpOnly cookie from C# Selenium tests?

    - by BenA
    I have a set of C# Selenium tests that need to delete a cookie that has the HttpOnly flag set. Unfortunately the DefaultSelenium.GetCookie() and DefaultSelenium.DeleteCookie() commands aren't able to access the cookie, because it has that HttpOnly flag set. I've confirmed this by removing the flag by hand, and checking that subsequent calls to either of those methods are then happily able to manipulate the cookie in question. Is there any other way to do this via the Selenium .NET client driver? All ideas welcome!

    Read the article

  • Capture output from browser call using Selenium

    - by gagneet
    I need to create a use case (using Selenium) in which I send HTTP calls with a Cookie through the browser and capture the return value in a text file. What do I need to do this, I have run this using CURL in the command line, but we are encountering issues with the same, and hence wish to verify using a real UI browser.

    Read the article

  • Sending multiple requests simultaneously to the Server using Selenium with Java

    - by gagneet
    I wish to send multiple requests to the server, simultaneously. The problem statement will be: Read a text file containing multiple URL’s. Open each URL in the web browser. Collect the Cookie information for each call, and store it to a file. Send another call: http://myserver.com:1111/cookie?out=text Store the output (body text) of this file to a separate file for each call made in 4 Open the next URL in the text file given in 1 and repeat steps 1-6. The above is to be run with multi-threading, so that I can send around 5-10 URL requests simultaneously. I have implemented something in Selenium using Java, but have not been able to do the multi-threading approach. Code is given below: package com.cookie.selenium; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import com.thoughtworks.selenium.*; public class ReadURL extends SeleneseTestCase { public void setUp() throws Exception { setUp("http://www.myserver.com/", "*chrome"); } public static void main(String args[]) { Selenium selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://myserver"); selenium.start(); selenium.setTimeout("30000000"); try { BufferedReader inputfile = new BufferedReader(new FileReader("C:\\url.txt")); BufferedReader cookietextfile = new BufferedReader(new FileReader("C:\\text.txt")); BufferedWriter cookiefile = new BufferedWriter(new FileWriter("C:\\cookie.txt")); BufferedWriter outputfile = null; String str; String cookiestr = "http://myserver.com:1111/cookie?out=text"; String filename = null; int i = 0; while ((str = inputfile.readLine()) != null) { selenium.createCookie("T=222redHyt345&f=5&r=fg&t=100",""); selenium.open( str ); selenium.waitForPageToLoad("120000"); String urlcookie = selenium.getCookie(); System.out.println( "URL :" + str ); System.out.println( "Cookie :" + urlcookie ); cookiefile.write( urlcookie ); cookiefile.newLine(); selenium.open( cookiestr ); selenium.waitForPageToLoad("120000"); String bodytext = selenium.getBodyText(); System.out.println("Body Text :" + bodytext); filename = "C:\\cookies\\" + i + ".txt"; outputfile = new BufferedWriter(new FileWriter( filename )); outputfile.write( bodytext ); outputfile.newLine(); i++; } inputfile.close(); outputfile.close(); cookiefile.close(); selenium.stop(); } catch (IOException e) { } } } What basically I am trying to do here is, open the first set of URL from a text file (which has list given of all the URL's i wish to open). Then when I capture the cookie information from here and store it, I open another window to output all the cookie information for that server to my browser window. This works fine when I do outside of Selenium code, but when I do it within the above code, it opens a "Save As..." popup and my tests stop. :-( I wish to save the contents of that second call to a new file, but have not been able to do the same. Also, if I have to send multiple such requests to the server, how would that be possible in Java using a Selenium Framework. Currently, I am opening multiple instances of the framework and running them with different parameters :-(

    Read the article

  • Help finding table cell using locator after tableCellAddress finds the cell

    - by Greg Weinman
    Hi All, I have a JSP page populated by javascript resulting in a typical table element cascade . After population I see the text I want using getTable("tableLister.listTable.1.1") The table also has a class=clsDisplayTableBody. I want to click the check box in column 0 for the row of interest. However, all of these tests fail isElementPresent("//*[text()="+cellContents+"]/../td[0]")) isElementPresent("//table[@class='clsDisplayTableBody']//tr[1]/td[0]")) isElementPresent("css='clsDisplayTableBody' tr:nth-child(1) td:nth-child(0)")) isElementPresent("//xpath=id('tableLister.listTable')/descendant::tr[1]/descendant::td[0]")) isElementPresent("//table[@id='tableLister.listTable']//tbody/tr[1]/td[0]")) isElementPresent("//table[@id='tableLister.listTable']//tr[1]/td[0]")) Is there anything else I could try? Regards, Greg Weinman

    Read the article

  • how to determine xpaths for ajax element.

    - by Anjali
    I need to detemine xpath for element 'mainForm:queryConfigure:fetchReport'. <span id="mainForm:queryConfigure:j_id18"> <table id="mainForm:queryConfigure:j_id19" class="showReportTable" align="center"> <tbody> <tr> <td> <input id="mainForm:queryConfigure:fetchReport" type="image" src="images/show_report.gif" name="mainForm:queryConfigure:fetchReport"/> </td> </tr> </tbody> </table> </span> i tried selenium.click("//input[@id='mainForm:queryConfigure:fetchReport'][@type='image'][@src='images/show_report.gif']"); AND selenium.click("//input[@id='mainForm:queryConfigure:fetchReport']"); One more case: <div class="tabUnselectedText" align="center"> <a href="javascript:renderPage('mainForm:consoleBeanId.1','Notifications' , 'notifications.faces');">Notifications</a> </div>

    Read the article

  • Selenium: How to click an HTML button element?

    - by Andrew
    I have button on the page that being used as a link to another page. So when the user clicks the button they are redirected to the right page. I am using the Selenium extension for PHPUnit and I would like to test that the button is correctly redirecting the user. Here is the HTML that I am trying to test: <button onclick="window.location='/sponsor';" value="Continue" type="button" id="sponsorContinue" name="sponsorContinue">Continue</button> I have tried a lot of different approaches to click the button, but I can't seem to get any of them to work: $this->click("//button[@id='sponsorContinue']"); This command executes and does not throw any errors, but the page isn't redirected. It works fine when I manually click the button. What should I do?

    Read the article

  • How do I get the cursor back in VS2010rc winforms designer after drawing controlls?

    - by Allen
    Not sure if this is a bug or if i'm just missing something but I cannot for the life of me figure out how to get my cursor back in the winforms designer in visual studio 2010. I opened up an existing project and added a group box, now my cursor is stuck drawing group boxes. I just want the simple pointer cursor back but nothing I do seems to bring it back. I almost expected it to be on the toolbox under "Cursor" but its not.

    Read the article

  • Reports Generation for Web Based Application Using Selenium Tool

    - by Rahul Mendiratta
    Currently we are generating HTML Reports for Automation, but those reports are not good enough to explain number of scenario which we cover in Automation, Is there anything we can use with Selenium to generate a proper reports which can give a complete overview and can easily understand by anyone First Thing we can show a complete pie charts which cover number of test case passed and Failed. Second thing we can show, what are test cases are there in this build.

    Read the article

  • Pass command line arguments to JUnit test case being run programmatically

    - by __nv__
    I am attempting to run a JUnit Test from a Java Class with: JUnitCore core = new JUnitCore(); core.addListener(new RunListener()); core.run(classToRun); Problem is my JUnit test requires a database connection that is currently hardcoded in the JUnit test itself. What I am looking for is a way to run the JUnit test programmatically(above) but pass a database connection to it that I create in my Java Class that runs the test, and not hardcoded within the JUnit class. Basically something like JUnitCore core = new JUnitCore(); core.addListener(new RunListener()); core.addParameters(java.sql.Connection); core.run(classToRun); Then within the classToRun: @Test Public void Test1(Connection dbConnection){ Statement st = dbConnection.createStatement(); ResultSet rs = st.executeQuery("select total from dual"); rs.next(); String myTotal = rs.getString("TOTAL"); //btw my tests are selenium testcases:) selenium.isTextPresent(myTotal); } I know about The @Parameters, but it doesn't seem applicable here as it is more for running the same test case multiple times with differing values. I want all of my test cases to share a database connection that I pass in through a configuration file to my java client that then runs those test cases (also passed in through the configuration file). Is this possible? P.S. I understand this seems like an odd way of doing things.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >