Unable to upload the file, facing problem with all the options.....Kindly Help!

Hello

Need help, i am unable to upload the file by using inbuilt keyword ‘Upload File’

Hence i am using a custom keyword but still i am unable to upload the file. Getting below error;

“07-13-2018 06:06:44 PM - [FAILED] - Unable to click on object ‘Object Repository/BM/Proposals/Browse_Solution_Diagram’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (243, 356).
Other element would receive the click: ”

I am using following custom keyword for File Upload
-----------------------------------------------------------

@Keyword

def uploadFile (TestObject to, String filePath) {

WebUI.click(to)

StringSelection ss = new StringSelection(filePath);

Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);

Robot robot = new Robot();

robot.keyPress(KeyEvent.VK_ENTER);

robot.keyRelease(KeyEvent.VK_ENTER);

robot.delay(1000) //NOTE THE DELAY (500, 1000, 1500 MIGHT WORK FOR YOU)

robot.keyPress(KeyEvent.VK_CONTROL);

robot.keyPress(KeyEvent.VK_V);

robot.keyRelease(KeyEvent.VK_V);

robot.delay(1000) //NOTE THE DELAY (500, 1000, 1500 MIGHT WORK FOR YOU)

robot.keyRelease(KeyEvent.VK_CONTROL);

robot.keyPress(KeyEvent.VK_ENTER);

robot.keyRelease(KeyEvent.VK_ENTER);

}

However when i use the below custom code to click on Browse button, the test case is showing Passed, but it does not open the File Upload Dialog box…

@Keyword

def clickUsingJS(TestObject to, int timeout){

WebDriver driver = DriverFactory.getWebDriver()

WebElement element = WebUiCommonHelper.findWebElement(to, timeout)

JavascriptExecutor executor = ((driver) as JavascriptExecutor)

executor.executeScript(‘arguments[0].click()’, element)

}

Please help as I have already spend 3 days in this, but still didn’t find the solution

Refer to the screenshot for xpath that i am using for Browse button

Screenshot1.jpg

Girish Mohite said: Kindly help please…

Hello

Need help, i am unable to upload the file by using inbuilt keyword ‘Upload File’

Hence i am using a custom keyword but still i am unable to upload the file. Getting below error;

“07-13-2018 06:06:44 PM - [FAILED] - Unable to click on object ‘Object Repository/BM/Proposals/Browse_Solution_Diagram’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (243, 356).
Other element would receive the click: ”

I am using following custom keyword for File Upload
-----------------------------------------------------------

@Keyword

def uploadFile (TestObject to, String filePath) {

WebUI.click(to)

StringSelection ss = new StringSelection(filePath);

Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);

Robot robot = new Robot();

robot.keyPress(KeyEvent.VK_ENTER);

robot.keyRelease(KeyEvent.VK_ENTER);

robot.delay(1000) //NOTE THE DELAY (500, 1000, 1500 MIGHT WORK FOR YOU)

robot.keyPress(KeyEvent.VK_CONTROL);

robot.keyPress(KeyEvent.VK_V);

robot.keyRelease(KeyEvent.VK_V);

robot.delay(1000) //NOTE THE DELAY (500, 1000, 1500 MIGHT WORK FOR YOU)

robot.keyRelease(KeyEvent.VK_CONTROL);

robot.keyPress(KeyEvent.VK_ENTER);

robot.keyRelease(KeyEvent.VK_ENTER);

}

However when i use the below custom code to click on Browse button, the test case is showing Passed, but it does not open the File Upload Dialog box…

@Keyword

def clickUsingJS(TestObject to, int timeout){

WebDriver driver = DriverFactory.getWebDriver()

WebElement element = WebUiCommonHelper.findWebElement(to, timeout)

JavascriptExecutor executor = ((driver) as JavascriptExecutor)

executor.executeScript(‘arguments[0].click()’, element)

}

Please help as I have already spend 3 days in this, but still didn’t find the solution

Refer to the screenshot for xpath that i am using for Browse button

Girish Mohite said:

Hello

Need help, i am unable to upload the file by using inbuilt keyword ‘Upload File’

Hence i am using a custom keyword but still i am unable to upload the file. Getting below error;

“07-13-2018 06:06:44 PM - [FAILED] - Unable to click on object ‘Object Repository/BM/Proposals/Browse_Solution_Diagram’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (243, 356).
Other element would receive the click: ”

I am using following custom keyword for File Upload
-----------------------------------------------------------

@Keyword

def uploadFile (TestObject to, String filePath) {

WebUI.click(to)

StringSelection ss = new StringSelection(filePath);

Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);

Robot robot = new Robot();

robot.keyPress(KeyEvent.VK_ENTER);

robot.keyRelease(KeyEvent.VK_ENTER);

robot.delay(1000) //NOTE THE DELAY (500, 1000, 1500 MIGHT WORK FOR YOU)

robot.keyPress(KeyEvent.VK_CONTROL);

robot.keyPress(KeyEvent.VK_V);

robot.keyRelease(KeyEvent.VK_V);

robot.delay(1000) //NOTE THE DELAY (500, 1000, 1500 MIGHT WORK FOR YOU)

robot.keyRelease(KeyEvent.VK_CONTROL);

robot.keyPress(KeyEvent.VK_ENTER);

robot.keyRelease(KeyEvent.VK_ENTER);

}

However when i use the below custom code to click on Browse button, the test case is showing Passed, but it does not open the File Upload Dialog box…

@Keyword

def clickUsingJS(TestObject to, int timeout){

WebDriver driver = DriverFactory.getWebDriver()

WebElement element = WebUiCommonHelper.findWebElement(to, timeout)

JavascriptExecutor executor = ((driver) as JavascriptExecutor)

executor.executeScript(‘arguments[0].click()’, element)

}

Please help as I have already spend 3 days in this, but still didn’t find the solution

Refer to the screenshot for xpath that i am using for Browse button

Kindly help please…

2 things you can try, although I am not sure they will help. (I am not a programmer)

First, check that the button element is visible by Katalon, (Verify element visible)

Secondly, After the button is click, try adding a 2 second delay, sometimes Katalon does things as fast as possible, and skips over things. (Delay 2)

It is not helping, what i have realised is that there is an element present on the element that i am trying to click…May be hence i am getting the error as "Element is not clickable at a point…

How to handle such scenarios where i can click on Browse button and File Upload Dialoq Box appears???

Screenshot.jpg