MySQL
- 1 ответ
- 0 вопросов
2
Вклад в тег
DROP FUNCTION IF EXISTS YourFunction;
DELIMITER $$
CREATE FUNCTION YourFunction (qty INT, orderid INT) RETURNS TEXT
BEGIN
DECLARE text_t TEXT;
SELECT `sum` INTO text_t FROM t_order_price_type WHERE `orderid` = orderid LIMIT 1;
RETURN text_t;
END$$
DELIMITER ;
DROP FUNCTION IF EXISTS YourFunction;
DELIMITER $$
CREATE FUNCTION YourFunction (p_qty INT, p_orderid INT) RETURNS TEXT
BEGIN
DECLARE text_t TEXT;
SELECT `sum` INTO text_t FROM t_order_price_type WHERE `orderid` = p_orderid LIMIT 1;
RETURN text_t;
END$$
DELIMITER ;
async Task PopulateMultipleFiles(Dictionary<string, string> fileMappings)
{
var tasks = fileMappings.Select(async kvp =>
{
var fileId = kvp.Key;
var filePath = kvp.Value;
ExecuteScript($"document.getElementById(\"{fileId}\").focus();");
var sendKeyTask = Task.Delay(1000).ContinueWith((_) =>
{
SendKeys.Send(filePath + "{ENTER}");
}, TaskScheduler.FromCurrentSynchronizationContext());
ExecuteScript($"document.getElementById(\"{fileId}\").click();");
await sendKeyTask;
await Task.Delay(1000);
});
await Task.WhenAll(tasks);
}
var fileMappings = new Dictionary<string, string>
{
{ "fln1", "poster.webp" },
{ "fln2", "image2.jpg" },
// Добавьте остальные файлы
};
await PopulateMultipleFiles(fileMappings);
IWebDriver driver = new EdgeDriver();
IWebElement fileInput = driver.FindElement(By.Id("fln1"));
fileInput.SendKeys("C:\\path\\to\\poster.webp");