Hello everyone,
I have saved some details including the XPath of the toggle button in the excel sheet (I have attached the screenshot below). I want to click the continue button that is on the website and the XPath should be taken from the Excel sheet.
This is what I have so far;
## Click the continue button
sleep 10s
click element ${LOCATOR_Continue} ${Element}
sleep 10s
EXECUTE JAVASCRIPT window.scrollTo(200,400)
sleep 10s
But this code is not working. It displays an error message as “TC_01 | FAIL | ValueError: ‘xpath://*[@id=“cols”]’ modifier does not match to Selenium Keys”
Give the excel sheet path.
Open it.
Switch to the required sheet.
Pick the row & column statically or can use dynamically using keywords in the library.
Use it as per your need.
If your question simply relates to the means of using an external data source for your tests:
Use the Robot Framework DataDriver library (>= 1.5.0) in conjunction with the preserve_xls_types option - see https://github.com/Snooz82/robotframework-datadriver/issues/57#issuecomment-907489453. Then format your cell in Excel as “text”. This should do the trick. If your code still does not work, then I would verify it by temporarily removing the Excel constraint and getting that value from e.g. a variable.