-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
needed for unicode filling throw adb
webElement.clear(); | ||
webElement.sendKeys(text); | ||
|
||
if (PageFactory.getEnvironment() == Environment.WEB) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch/case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rejected.
import org.slf4j.LoggerFactory; | ||
import ru.sbtqa.tag.pagefactory.drivers.TagMobileDriver; | ||
|
||
public class MobileConsole { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AdbConsole. Because when we will add Iphone it will confuse everything. Also you can describe the interface which will abstract you from mobile platform.
public static boolean execute(String deviceUDID, String command) { | ||
ProcessBuilder processBuilder = new ProcessBuilder(new String[]{"adb", "-s", deviceUDID, "shell", command}); | ||
LOG.info("Command '{}' is processing...", command); | ||
Process process; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are here? Why are not 27 line?
if (PageFactory.getEnvironment() == Environment.MOBILE && TagMobileDriver.getAppiumClickAdb()) { | ||
int x = webElement.getLocation().getX() + webElement.getSize().getWidth() / 2; | ||
int y = webElement.getLocation().getY() + webElement.getSize().getHeight() / 2; | ||
AdbConsole.execute(String.format("input tap %s %s", x, y)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add description for this things? Because i don't understand what is it :)
#25