WillClarkeOccasional ContributorJoined 8 years ago8 Posts1 LikeLikes received2 SolutionsView All Badges
ContributionsMost RecentMost LikesSolutionsSQL Connections when running CrossBrowserTesting Good afternoon all, We have been using TC for a little while now with SQL scripts ran with an ODBC DSN setup on the physical box with test execute and test complete. We are thinking about moving test to CrossBrowserTesting and are getting a '[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified' when running these tests, which is expected as its no longer running on those physical boxes. But I am not seeing anything in the resources for CrossBrowserTesting about how we should setup sql scripts to run, or even if using the same kind of setup is even feasible. Any help or advice would be appreciated. Re: Downloading and looking at a file Thanks for the answers, just putting this code snippet here incase someone wants to not have to look through multiple links This is the code I used to check to see if a csv file has a value for a specific column. Luckily with the update to TC 14, the CSVDriver was super easy to use, Also you will most likely need to download Microsoft Access Database Engine 2010 Redistributable here -> https://www.microsoft.com/en-us/download/details.aspx?id=13255 function GEN_FILE_TestCSV(FilePath, ColumnName, ColumnValue) { var HasValue; HasValue = false; DDT.CSVDriver(FilePath); // Iterates through records while (! DDT.CurrentDriver.EOF()) { if (DDT.CurrentDriver.Value(ColumnName) == ColumnValue) { HasValue = true; } DDT.CurrentDriver.Next(); } // Closes the driver DDT.CloseDriver(DDT.CurrentDriver.Name); if(HasValue == false) { //Posts an error to the test log. Log.Error("The Expected Value looked for in the file is not there", ""); } else { Log.Message("The Expected Value looked for in the file is there", ""); } } Downloading and looking at a file I am having difficulties attempting to script running a report, then downloading the report from the test site in order to veridy a set of values is on the file. Does anyone have a best practice or an example they wouldnt mind sharing? The file can be of any real format, txt, csv, excel, etc... But im sure once I can do it with one, the others would not be too terrible. SolvedRe: SSL Security error when running SQL scripts What the IT team ended up okaying and doing was adding a new ODBC DSN with stronger security. We updated the connection string to use the new DSN and it worked. Thanks for the suggestions and help. SSL Security error when running SQL scripts Hey all. We made some security updates switching from TLS 1.1 to TLS 1.2 on our SQL servers and we get the following error when attempting to connect to the server "[DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Security error" for the script in particular we use a connection string like follows "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DBNAME;Data Source=SERVERNAME;" NOTE: I also changed it to use ODBC instead and still for the SSL Security Error Prior to the security update, everything has been hunky dory and we have not had errors with anything else. has anyone else experienced this issue or know the best way to resolve? SolvedWeb Input determine focus and value Is there a way to determine what input on the page currently has focus through test complete? I havent seen anything thusfar. Also a way to pull the current value of said input. Re: Is there a way to update a single record in SQL by based on passing in a variable from the test case Awesome, thanks dude with the follow up PM. Everything is cool Is there a way to update a single record in SQL by based on passing in a variable from the test case For example, before my test, I need to disable an account so that I can test to make sure I cannot login with that username / password. I would need to run SQL like the below. update useraccounts set accountlocked = 1 where username = 'usernamevar' My google-fu and general searching did not find anything really applicable and could use some assistance. Thanks Solved