Hello I am beginner. I also need to upload a csv file to the website but I could not.
Can you describe it in a simple way I can understand. I’m just connecting to the website right now. I’m choosing where to install. I cannot scroll through the xpath path and then to open the installation page. So I can’t open the loading page on the web page and I can’t load the file.
The flow is below.
Can you show me where to fix it.
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import internal.GlobalVariable as GlobalVariable
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.thoughtworks.selenium.Selenium
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.WebDriver
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium
import static org.junit.Assert.*
import java.util.regex.Pattern
import static org.apache.commons.lang3.StringUtils.join
WebUI.openBrowser('https://www.katalon.com/')
def driver = DriverFactory.getWebDriver()
String baseUrl = “https://www.katalon.com/”
selenium = new WebDriverBackedSelenium(driver, baseUrl)
selenium.open(“https://airtable.com/”)
selenium.click(“xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘Global Port copy’])[1]/following::i[1]”)
selenium.selectFrame(“index=2”)
------doesn’t work after--------
selenium.click(“/html/body/div[1]/div/div/div/div”)
selenium.type(“xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘Or click to choose a file…’])[1]/preceding::input[1]”, “C:\\fakepath\\deneme_x.csv”)
selenium.click(“xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘Cancel’])[1]/following::button[1]”)