Way for Implementing Automation Code for both mobile and Web scripts for the same Project

(Pavan N) #1

Is it possible to have both Mobile and Web scripts for the same projects where Mobile app function is depend on the web part to be sync with the each other.But the issue i am facing in the driver conflict between them both.can it be possible to have it on the same project and performs the Test Simultaneously in the same Test case.

(Joe) #2

Hello @pavan_n!

One answer may depend on how the behavior is delivered to the device. If the behavior is the same for both devices (delivered from a server back end, say), then your test objective is to verify that both can reach the behavior. In that case, I believe you have different tests - one test for each device because of UI differences.

If your test objective is to evaluate just the behavior, the device does not matter and you can evaluate the behavior independently of the device.



(David Luu) #3

Can you elaborate on what driver conflict you are having?

(Pavan N) #4

Using Page Object Model Pattern
We should have a testcase that performs Web app automation in chrome after that we have to invoke the Mobile app after it.(Sync of Data should happen in between the applications).
We are using ChromeDriver for Webapplication and AndroidDriver for Mobile.On calling the methods from different class file in the Same Test.(We need to fetch the values from the Mobile App as the android element and use it in the web application part for of web Element)


(Ola) #5

I’m still unsure exactly what your conflicts are so this may not be what you are after. If what I am hearing is that you have the same / similar application in web as well as in the mobile I suggest you create one more level of abstraction. That is create an object that is the capacities of both pages. I.e. Login / Logout and then your implementation of the device specific part becomes more of implementations that fulfill the contract of the abstraction. Meaning that your test scripts work on the abstraction instead and is therefore the same and which one you use is a matter of setup.

Good luck!

1 Like
(Pavan N) #6

@ola.sundin @devtotest thanks!!