Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Move plotva #35

Merged
merged 9 commits into from
Mar 10, 2017
Merged

Move plotva #35

merged 9 commits into from
Mar 10, 2017

Conversation

kosteman
Copy link
Contributor

#25

webElement.clear();
webElement.sendKeys(text);

if (PageFactory.getEnvironment() == Environment.WEB) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch/case?

Copy link
Contributor Author

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 {
Copy link
Contributor

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;
Copy link
Contributor

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));
Copy link
Contributor

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 :)

@kosteman kosteman removed the request for review from warorc March 10, 2017 07:53
@kosteman kosteman merged commit 6eb4603 into master Mar 10, 2017
@kosteman kosteman deleted the move-plotva branch March 10, 2017 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants