Contributions
Re: Project Variables - DB Table - DB2
Ok, I have switched to the IBM OLE DB Provider for DB2. I'm not sure why I didn't select that in the first place. I guess I missed it. Anyway, even with the IBM OLE DB Provider for DB2 I am still having issues. I am basically having the same issues that I was when using the Microsoft OLE DB Provider for ODBC Drivers. However, I do have an update... Originally, I said I could only create a DB Table store if I selected Custom Query and typed out my query. It is still true that if I want to create a custom query that I need to type out my query. I can type it out in the "Enter SQL Query" window, or I can click the Design button and type it out in the SQL tab of the SQL Designer. I can't use the SQL Designer and select the tables or views from the list. The tables and views do not have the schema associated with them. Originally, I didn't think I could select the data source types of Table or View, that I had to select Custom query. However, I can use the view and table options. After I select which view or table I want from the dropdown list, I just need to add my schema name and a period in front of the table name. That seems to work just fine. However, I still can't figure out the project variables. When it comes time to select the table name, I am just given a scrollable list where I can just select a table. Since the schema name is not in front of the table, I don't think it can find the table. Also, unlike the DB Table stores, I can't type the schema name in front of the table name. Any ideas?1.8KViews0likes0CommentsCan web applications use the NAME of input items instead of ID?
I am trying to test a web application. On a page, there are a few text boxes. One text box has a javascript date picker on it. This field has a name of caseopendate, and the javascript date picker creates an ID of Dp and then a 13 digit number. This number seems to change each time you get to the page. So, during a test where I hit the page 3 times, it mapped it as three different objects of textboxDp with a different 13 digit number each time. Is there a way that this can be mapped to the name rather than the changing ID? On another note, during one of my recordings, it seemed to actually map it as textboxcaseopendate also. The steps I performed were... 1. Opened page 2. clicked on the text box 3. entered a date (the javascript date picker opened, but I just entered the date in the text box) 4. clicked on another field 5... did some other steps and then opened the same page again 6. Repeated 2-4 what was recorded was... panel2 = panel.panelDataArea; panel2.textboxTecaseopendate.Click(3, 8); here is where it uses the name textbox = panel2.textboxDp1288370558750; using ID here textbox.HoverMouse(41, 15); textbox.SetText("10/25/20"); Not sure why this is here in 3 rows. I just tried to type textbox.SetText("10/25/201"); out the date 10/25/2010. It was really, really slow responding. textbox.SetText("10/25/2010"); panel3 = panel.panelDataArea1; panel3.Click(151, 8); ... ... ... textbox2 = panel2.textboxDp1288370694719; second time in and only ID value shows up textbox2.Click(3, 10); textbox2.HoverMouse(23, 9); textbox2.SetText("10/24/2010"); textbox2.HoverMouse(23, 9); panel3.Click(148, 7);21KViews0likes2CommentsRe: Project Variables - DB Table - DB2
Just to add an update to this... I tried creating a store and selecting a table/view. When I do that, I get an error that says dbuser.mytable (or myview) is undefined. The reason is that mytable (and myview) do not live under the dbuser schema. It is automatically trying to add that to the table name. Also, if I use the custom query and I just select a table name or user name in the SQL designer, I get a message that says it is unable to find the table. Again, I am thinking it is trying to add the user that I am logged into as the schema/owner of the table. If I just type out my SQL, it works for me. Thanks1.8KViews0likes0CommentsProject Variables - DB Table - DB2
Using TestComplete Enterprise version 8... I created a DBTables store using an ODBC connection to a DB2 database. I actually used a query to pick the appropriate columns and rows I wanted. I was able to do this and get valid data from the DB2 database. I then tried to create a DB Table variable for my project. Again, I tried to use an ODBC connection to the same database as I did for the store. I was able to connect to the database and I was able to see a list of tables. When I see the list of tables, it says at the top "Select a database table, view or query from which the DB Table variable will retrieve data.". When creating the store, I was able to specify a query. Here, it doesn't look like I can create a query. Also, if I select a table and click the View Table button, I get an error that says "Unable to display the table data. The following error occurred: [IBM][CLI Driver][DB2/NT]SQL0104N An unexpected token '* from' was found following 'select '. Expected tokens may include: '<value_expr_primary_or_stub>'. SQLSTATE=42601". I tried to use it in a script to see if it would work there. I tried to log the column count and I get pretty much the same message. Am I doing something wrong? I seem to be able to create a store from the database just fine. I also seem to be able to pull up the tables when trying to create a DB Table variable for the project. It just doesn't seem to work correctly to retrieve the data. Maybe there is something wrong in the application? If it helps, the following is what the default value shows for the DB Table variable. The connection string looks the same as the connection string for the store. The table only shows the table name though. I would have thought the schema name would be included in there all. The table isn't owned by the user, and the same name could be in multiple schemas. {Table: "STABLE"; connection string: "Provider=MSDASQL.1;Password=dbpass;Persist Security Info=True;User ID=dbuser;Data Source=CARHORSD"} Thanks15KViews0likes6CommentsObject does not exist error handling / close IE
I apologize if this has been answered before, or if this can be found elsewhere. I am a newbie to TC and I tried to search the help files and forums. So, we purchased TC about 6 months ago, and we only had two test cases created. The person who was using it before, and who had been trained on it, had their priorities/responsibilities changed. So, I am the lucky one who is trying to utilize TC. So, I wanted to start off with something simple. I recorded a test that would start up a login page in IE, a user name and password is entered and the submit button is pressed. The new page opens. A web comparison is performed to make sure the correct place is reached. The logout link is pressed. Another web comparison is performed to make sure they were logged off. This all seems to work fine. When recorded, I selected to have this saved as JScript. I went into the test and changed the password so that the user would not be able to log in successfully and get to the correct place. When I run the test case, it waits for the login to process but then fails with "The object does not exist. See Remarks for details." The remarks say that an error occurred while call the "Wait" method or property of the "pageloginpage" object. Of course this makes sense to me since it didn't get to the expected page. When this happens, the test script ends and leaves IE open on the machine. So, I tried using JScript try/catch to catch the error and then close IE. If IE doesn't close, it causes issues when trying to run subsequent test cases. It doesn't seem that the try catch gets executed when this runs. I even tried the following to see if I was getting into the catch or finally blocks... function test() { try { all code here to open IE, try to login, etc. etc } catch(e) { Log.Error("reached error"); } finally { Log.Message("reached finally"); } } If I have the correct password and the test goes through all the scripts, I get the message from the finally block. However, if I have the wrong password and I get the "object does not exist" error, I don't get the catch message or the finally message. It seems that TC job stops processing at that point. So, is there a way to catch this error and perform processing (like closing IE)? Thanks13KViews0likes1Comment