How to run two test case and to put a browser on left half screen and a browser on right half screen?


#1

I want to run two test case and to see browser not one above other one, but one beside other one.
Is it possible?


#2

You can move the browser using code like this:

    WebDriver driver = DriverFactory.getWebDriver()
    driver.manage().window().setPosition(new Point(x, y))

You will need to set the values for x and y.


#3

I tried to use that but I can’t use in katalon just that code without use katalon code.
If I use that code, two browser are opened, one in left and one in right, but I can use just one, that one from left opened by Katalon, for selenium I need use selenium code:
"
WebUI.openBrowser(’’)
driver = new ChromeDriver()
driver.get(‘https://google.com/’)
driver.manage().window().setPosition(new Point(1280, 5))
WebUI.delay(5)
driver.close()
"
and import:
"
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.chrome.ChromeDriver as ChromeDriver
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import org.openqa.selenium.By as By
import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor
import org.openqa.selenium.Point as Point
import org.openqa.selenium.WebElement as WebElement
"


#4

So I can use a code with that syntax WebUI. setPosition () to set browser position on the desktop?
Or something like that?


#5

Yes. That is why I posted it for you.


#6

Thank you, now I succeed to do it.
I used without open the browser and wrong imports.
Now is it OK.


#7